Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev mode which doesn't catch exceptions #1241

Closed
4 tasks done
NaridaL opened this issue Nov 14, 2017 · 2 comments
Closed
4 tasks done

Dev mode which doesn't catch exceptions #1241

NaridaL opened this issue Nov 14, 2017 · 2 comments

Comments

@NaridaL
Copy link
Contributor

NaridaL commented Nov 14, 2017

I've read #731, but the resolution isn't very satisfying. The current behavior makes debugging unnecessarily difficult. extras.onReactionError(e =>{ throw e; }); makes things slightly better but doesn't fix the main issue that the debugger will not stop at the location of the actual error, but rather on the rethrow, which makes it impossible the inspect the values of the problematic stack frames.

Halting on every exception will have one stepping through a bunch of caught exceptions in other frameworks which isn't helpful either.

  1. Idea:
  • What problem would it solve for you? ^^
  • Do you think others will benefit from this change as well and it should in core package (see also mobx-utils)? Yes, this would help everyone debugging.
  • Are you willing to (attempt) a PR yourself? If necessary.
@mweststrate
Copy link
Member

@NaridaL I see why the idea is relevant :). With the limatations of exception handling in JS it is really hard to find a behavior that works optimal for all causes. Feel free to attempt a pr, for example by introducing extras.disableErrorBoundaries() (which prints a clear warning that this is a dev / debug only feature)

@mweststrate
Copy link
Member

Will be implemented in Mobx4. Thanks!

@mweststrate mweststrate mentioned this issue Feb 27, 2018
38 tasks
mweststrate added a commit that referenced this issue Feb 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants