"open" now writes to standardError and quits when opening a file fails.

Using assert here was a really bad idea since it may not be evaluated in a release build.
This commit is contained in:
Kare Morstol
2014-08-28 00:12:01 +02:00
parent 1e31759b09
commit 5aad0cc3e4
2 changed files with 11 additions and 2 deletions
@@ -0,0 +1,5 @@
import SwiftShell
let file = open("file which does not exist")
print("this is not printed, the script has exited")