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_exception() is useless in IE console #17

Open
chillu opened this issue Feb 23, 2012 · 2 comments
Open

warn_exception() is useless in IE console #17

chillu opened this issue Feb 23, 2012 · 2 comments

Comments

@chillu
Copy link
Contributor

chillu commented Feb 23, 2012

It traps the exception and relies on the toString() method to be properly implemented in the console.
In IE, you get "Uncaught exception in [Object]..." which isn't all that helpful.
Disabling this method and actually throwing the exception on the other hand provides useful info even in IE.
Remind me again why we need this exception trapping in the first place? :)

@hafriedlander
Copy link
Owner

Lots of reasons.

We run through calling a bunch of methods in a row, and if one of the first methods throws an exception, we often need to still call later methods (i.e. to isolate namespaces)

If you get an exception in an event handler (especially in onmatches) and you don't catch exceptions they are silently swallowed.

Better solution would be to get exceptions printing properly in IE. Must be a library around that does pretty printing.

@chillu
Copy link
Contributor Author

chillu commented Feb 29, 2012

Thanks for the explanation! Pretty printing still won't allow the console to use its built-in features around linking objects and DOMElements to its own interactive views, right? Even just a stack trace would be better than nothing though :)

Why would we need to call later methods once one fails? I'm happy for an exception to halt JS execution.

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

No branches or pull requests

2 participants