We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:default
version
0.1.0
platform
Ubuntu 20.04.3 with 16.10.0
problem
Normal ClojureScript (and JavaScript) can catch normal (non-Error) values when they are thrown, but nbb is not catching them.
repro
user=> (try (throw (js/Error. "blah")) (catch :default e (prn :e e))) :e #object[Error Error: blah] user=> (try (throw "blah") (catch :default e (prn :e e))) "blah"
expected behavior
Same as ClojureScript:
cljs.user=> (try (throw (js/Error. "blah")) (catch :default e (prn :e e))) :e #object[Error Error: blah] cljs.user=> (try (throw "blah") (catch :default e (prn :e e))) :e "blah"
Note that this is functionality supported natively by JavaScript itself:
> try { throw("blah") } catch (e) { console.log("e:", e) } e: blah > try { throw([1,2,3]) } catch (e) { console.log("e:", e) } e: [ 1, 2, 3 ]
The text was updated successfully, but these errors were encountered:
wat? I didn't know this was possible!
Sorry, something went wrong.
Fixed in SCI. Will bump after I fix #115
Verified both this and #115. Thanks!
@kanaka You're welcome. If you are using nbb at work or in an OSS project, it'd be great if you shared something about it here:
#91
No branches or pull requests
version
0.1.0
platform
Ubuntu 20.04.3 with 16.10.0
problem
Normal ClojureScript (and JavaScript) can catch normal (non-Error) values when they are thrown, but nbb is not catching them.
repro
expected behavior
Same as ClojureScript:
Note that this is functionality supported natively by JavaScript itself:
The text was updated successfully, but these errors were encountered: