mfikes / ambly

ClojureScript REPL into embedded JavaScriptCore
http://ambly.fikesfarm.com
Eclipse Public License 1.0
541 stars 21 forks source link

Check that WebDAV mount succeeds #67

Closed mfikes closed 9 years ago

mfikes commented 9 years ago

If the WebDAV mount fails, Ambly blindly goes on and will then log a misleading exception starting with

java.io.FileNotFoundException: /Volumes/Ambly-5CDB1D7C/cljs/core.cljs (No such file or directory)
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(FileOutputStream.java:270)
mfikes commented 9 years ago

With this fix, users will now see the following instead if it occurs:

orion:Clojure mfikes$ script/jscrepljs 

[1] Ambly Demo on iPhone Simulator (orion-fikesfarm-com)

[R] Refresh

Choice: 1
java.lang.Exception: Unable to mount WebDAV at http://10.0.1.200:49153
    at ambly.repl.jsc$mount_webdav.invoke(jsc.clj:259)
    at ambly.repl.jsc$setup.invoke(jsc.clj:281)
    at ambly.repl.jsc.JscEnv._setup(jsc.clj:379)