2 Examples top

  • => (try
         (/ 1 0)
         (catch Exception e (str "caught exception: " (.getMessage e))))
    
    "caught exception: Divide by zero"
  • ;; for Clojurescript use js/Object as type
    (try
       (/ 1 0)
       (catch js/Object e
           (.log js/console e)))
Log in to add / edit an example.

See Also top

Log in to add a see also.

Comments top

No comments for try. Log in to add a comment.