Catch and re-throw exceptions on rule right-hand sides with more information
Closed this issue · 3 comments
rbrush commented
It can be hard to track down exceptions thrown on rule right-hand sides because it's not clear where they came from, especially in cases where the right-hand side was generated and doesn't have line and file information.
We can address this by catching exceptions and wrapping them in another exception that includes the production name and right-hand side expression.
stephenbrady commented
Looking forward to this simple change. FYI, in clojurescript, you can catch :default
instead of js/Object
. :default
is the idiomatic way to catch everything.
rbrush commented
@stephenbrady Good call! I went ahead and changed that and added a simple unit test for the ClojureScript flow.
rbrush commented
Closing this in preparation for a 0.9.2 release.