Files
SwiftShell/SwiftShellTests/Scripts/exitswhenopeningnon-existentfile.swift
T
Kare Morstol 5aad0cc3e4 "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.
2014-08-28 00:12:01 +02:00

6 lines
117 B
Swift

import SwiftShell
let file = open("file which does not exist")
print("this is not printed, the script has exited")