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

better error #633

Closed
rickmed opened this issue May 12, 2016 · 3 comments
Closed

better error #633

rickmed opened this issue May 12, 2016 · 3 comments

Comments

@rickmed
Copy link

rickmed commented May 12, 2016

Right know it logs something like "Cannot read property 'blur' of null" when there is a not existing selector, would be great for next version to have additional info of the action and what triggered the error, etc :)

Also, if there is a fatal error like a not existing selector, shouldn't the error be logged even if there is no catch?

@rickmed rickmed changed the title better error messages better error May 12, 2016
@Mr0grog
Copy link
Contributor

Mr0grog commented May 13, 2016

Also, if there is a fatal error like a not existing selector, shouldn't the error be logged even if there is no catch?

This part is a little debatable (I’m totally with you on better messages)—the reason promises don’t natively do this is because you can always add a rejection handler via then or catch later after the error occurs. Instead, you can listen for the process object’s unhandledRejection event:

process.on('unhandledRejection', (error, promise) => {
    console.error("An action failed because:", error);
});

@rosshinkley
Copy link
Contributor

Right know it logs something like "Cannot read property 'blur' of null" when there is a not existing selector, would be great for next version to have additional info of the action and what triggered the error, etc :)

This part, however, dovetails with some of the other issues we've been talking about in #645, #646, and #593. I'm on board for making events have more helpful errors.

@rosshinkley
Copy link
Contributor

I'm going to merge this with #646.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants