can't read file

This commit is contained in:
Chris Wanstrath 2011-09-04 18:56:51 -07:00
parent d45edcd5ff
commit 9d200700bc

View File

@ -93,7 +93,10 @@ __exists = (path) ->
OSX.NSFileManager.defaultManager.fileExistsAtPath path
__read = (path) ->
OSX.NSString.stringWithContentsOfFile(path).toString()
try
OSX.NSString.stringWithContentsOfFile(path).toString()
catch e
throw "require: can't read #{path}"
__modules = {}
__defines = []