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

Errors raised in promise callbacks should be logged to the console #59

Closed
rixo opened this issue Oct 29, 2012 · 4 comments
Closed

Errors raised in promise callbacks should be logged to the console #59

rixo opened this issue Oct 29, 2012 · 4 comments

Comments

@rixo
Copy link

rixo commented Oct 29, 2012

I understand that the Promise/A spec requires that exceptions raised in callback do not halt execution. However, silenting them completely leads to a lot of confusion, especially before one realizes that Deft is catching all their JS errors.

Errors can be logged to the console without crashing the execution thread. For example, in Chrome:

console.error(error.stack)

will give the same output as an uncatched error, with the "correct" stack trace. I don't know for other browsers, but even if the full stack cannot be provided, a notice should definitely be issued.

@brian428
Copy link
Member

If a callback fails and the catch handler runs, the Deferred is rejected
and the failure handler is invoked. Still, you're probably right that it
could also send a message to the Deft Logger. Did you add an ER for this by
chance?

Thanks,

Brian

On Sun, Oct 28, 2012 at 9:26 PM, rixo notifications@github.com wrote:

I understand that the Promise/A spec requires that exceptions raised in
callback do not halt execution. However, silenting them completely leads to
a lot of confusion, especially before one realizes that Deft is catching
all their JS errors.

Errors can be logged to the console without crashing the execution thread.
For example, in Chrome:

console.error(error.stack)

will give the same output as an uncatched error, with the "correct" stack
trace. I don't know for other browsers, but even if the full stack cannot
be provided, a notice should definitely be issued.


Reply to this email directly or view it on GitHubhttps://github.com//issues/59.

@rixo
Copy link
Author

rixo commented Oct 29, 2012

I am sorry, I don't know what an ER is. What does it mean?

@brian428
Copy link
Member

Enhancement Request.

On Mon, Oct 29, 2012 at 7:58 AM, rixo notifications@github.com wrote:

I am sorry, I don't know what an ER is. What does it mean?


Reply to this email directly or view it on GitHubhttps://github.com//issues/59#issuecomment-9863798.

@rixo
Copy link
Author

rixo commented Oct 29, 2012

Like a Pull Request? I have just submitted one : #60

Not sure that it will be useful to you though, I patched the JS but it seems that you develop Deft in CoffeeScript.

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

3 participants