Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
/angular.jsPublic archive

Add traceback to unhandled promise rejections#15522

Closed
graingert wants to merge2 commits intoangular:masterfromgraingert:patch-3

Conversation

graingert
Copy link
Contributor

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature

What is the current behavior? (You can also link to an open issue here)
Console is filled with meaningless:Possibly unhandled rejection: {} errors

What is the new behavior (if this is a feature change)?
Console is filled with juicy traceback info.

Does this PR introduce a breaking change?
I don't think so

Please check if the PR fulfills these requirements

Other information:

@graingert
Copy link
ContributorAuthor

graingert commentedDec 19, 2016
edited
Loading

This could break people relying on unhandled rejections never being real exceptions. To be non-breaking we could add a$unhandledRejectionHandler service that takes a rejection, and delegates to$exceptionHandler this way I could add a handler that passes the exception directly but the default would be to strip the error and tasty tracebacks

@gkalpak
Copy link
Member

Actually, the "juicy info" does already exist. It is just stringified into a less juicy{} (which we need to fix).
Closing as duplicate of#14631.

@graingertgraingert deleted the patch-3 branchDecember 19, 2016 23:00
@graingert
Copy link
ContributorAuthor

@gkalpak stringifying the exception breaks trace-back info because angular doesn't stringify errors properly.

Angular calls Errors 'exceptions' and brutally stringifies them before they can be safely carried to the gentle, sweet, embrace of window.onerror.

@graingert
Copy link
ContributorAuthor

graingert commentedDec 19, 2016
edited
Loading

@gkalpak no it doesn't.

Nobody wants angular to mess with their Errors and turn them into 'exceptions' for the$exceptionHandler

re-opened for your delectation and delight at#15527

@gkalpak
Copy link
Member

gkalpak commentedDec 19, 2016
edited
Loading

That's what I meant by "we need to fix it". Embarrassing as it may be, I have to admit I did not realize this was a PR, until now. I thought it was an issue 😳

Sorry, for not paying attention and thx for your perseverance. I promise I'll treat#15527 rightly 😛

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers
No reviews
Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@graingert@gkalpak@googlebot

[8]ページ先頭

©2009-2025 Movatter.jp