Improve exception debugging by removing catch and rethrow from re-frame's router #627
Description
I have verbally received the following suggestion, which is aimed at making it easier to debug event handlers when they throw exceptions ...
Currently, when an exception is thrown in an event handler, it is caught by the re-frame router, which does some cleanup, and then rethrows. This catch and rethrow business is a nuisance - it adds a little sand into the gears. And it probably isn't actually needed - can it be removed?
Why? Chrome's devtools will break on uncaught exceptions, which is good. It will give you the call stack and locals at the throw point. But when the exception is rethrown (as is the case in re-frame event handlers) it is the rethrow point which is reported - what we'd like is for devtools to stop at the original throw point (the event handler) and not the rethrow point (deep in the guts of re-frame's router)