Resolves #5588: adds openFileStream proc that throws on failure (#7282)

This commit is contained in:
twetzel59 2018-03-04 11:30:28 -05:00 • committed by Andreas Rumpf
commit 9079517d71
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,10 @@
discard """
file: "tstreams3.nim"
output: "threw exception"
"""
import streams
try:
var fs = openFileStream("shouldneverexist.txt")
except IoError:
echo "threw exception"