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

Warn if an action is rejected with a syntax error #282

Open
3 tasks
nhunzaker opened this issue Mar 31, 2017 · 0 comments
Open
3 tasks

Warn if an action is rejected with a syntax error #282

nhunzaker opened this issue Mar 31, 2017 · 0 comments

Comments

@nhunzaker
Copy link
Contributor

nhunzaker commented Mar 31, 2017

Maybe in strict mode only, it would be neat to check to see if the error passed to the promise form is a standard error, like:

function promiseAction () {
  return new Promise(function (resolve, reject) {
    // The error is right here, can you see it?
    resolev('body')  
  })
}

This is from a difficult to track down error on a current project. Things to figure out:

  • Was it just our Promise library? Or did Microcosm do something to prevent Chrome from surfacing the uncaught error?
  • Is this just a rabbit hole? Should we only check for SyntaxError, TypeError, or ReferenceError?
  • Is this too helpful? Should we consider an option to mute this sort of thing?

cc @solomonhawk

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