Skip to content

Send exceptions to 10x #34

@stumitchell

Description

@stumitchell

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).
Screenshot 2020-07-17 at 14 34 33

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.

See day8/re-frame-10x#273

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions