-
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Currently in re-frame-10x
when a traced event handlers raises an exception there is no visual indication of this disaster shown in the Events
panel (apart from half of the trace missing because the execution was prematurely halted).
If the exception is shown the trace screen would be a fantastic help to determine what went wrong as it would show the values of the fragments that lead up to the error.
I suggest that the form that caused the exception should be traced and displayed in red in 10x.
The value of that form should be the error and it should be displayed somewhere by default.
To enable this we will need to send exception information as well as result to 10x when we use send-trace!
or perhaps we need another function send-exception!
.
To do this the dbgn
macro will need to be changed so that exceptions are caught and sent to re-frame.trace
However, there is a counter argument that if we catch errors it will not allow the workflow where the programmer wishes to use chrome dev tools to break on the error and bring them to the offending code. So perhaps we need a way to turn off this behavior easily.