Skip to content

yonatane/rye

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rye

Clojure error handling

Currently only implements try-let which keeps the bindings even in the catch and finally clauses.*
* Not necessarily a good idea

Usage

(try-let [a (create-a)
          b (create-b a)]
  (create-c b)
  (catch Exception e
    (when b (close b))
    (when a (close a))
    (throw e))
  (finally
    (println "a:" a "b:" b)))

See tests for more examples.

Internally implements clojure.lang.IExceptionInfo that doesn't write the stacktrace, which is a part from fmnoise/flow

License

Copyright © 2020 Yonatan Elhanan

Distributed under the MIT License

About

Misc error handling

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published