Created
December 16, 2014 20:59
-
-
Save l1x/3e991063483f1204536f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
works=> (try {:ok (slurp "//ads/ad/as/dasd/asd") } (catch Exception e {:error "Exception" :fn "read-file" :exception (.getMessage e) })) | |
{:error "Exception", :fn "read-file", :exception "/ads/ad/as/dasd/asd (No such file or directory)"} | |
doesnt=> (try {:ok (map inc (list 1 2 3 "asd")) } (catch Exception e {:error "Exception" :fn "read-file" :exception (.getMessage e) })) | |
ClassCastException java.lang.String cannot be cast to java.lang.Number clojure.lang.Numbers.inc (Numbers.java:110) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment