Skip to content

Unhandled exceptions #1022

Answered by phoddie
tve asked this question in Q&A
Feb 1, 2023 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

I've now had an unhandled exception several times and it's always a bit of a goose chase.

By default, xsbug breaks on exceptions. That shows the line of code where the exception occurred, the stack trace, and allows you to inspect variations in each stack frame. By default, xsbug breaks on exceptions. Perhaps you disabled it?

The behavior of unhandled exceptions is not specified by the JavaScript language. Each runtime is free to implement the behavior it believes best. The Moddable SDK chooses to exit the process on unhandled exceptions because it is the safest default behavior.

XS itself does not decide what to do in response to exceptions and other potentially fatal exceptions. Inst…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@tve
Comment options

@tve
Comment options

@phoddie
Comment options

@phoddie
Comment options

Answer selected by tve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants