Add better error reporting to “open” function. Add public function "printErrorAndExit".

This commit is contained in:
Kare Morstol
2014-11-23 23:31:06 +01:00
parent 05fb61a4ab
commit a377eb18fd
2 changed files with 22 additions and 22 deletions
+1 -2
View File
@@ -11,10 +11,9 @@ import XCTest
class FileHandle_Tests: XCTestCase {
// waiting for error handling to be implemented
func notestOpenForReadingFileWhichDoesNotExist () {
// prints error message and stops execution.
let file = open("file which does not exist")
XCTFail("not implemented yet")
}
func testReadFileLineByLine () {