-
Notifications
You must be signed in to change notification settings - Fork 26.6k
fix(compiler): use FatalDiagnosticError to generate better error messages #35244
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
fix(compiler): use FatalDiagnosticError to generate better error messages #35244
Conversation
4cd17b8
to
961e07e
Compare
Also, I would consider this |
961e07e
to
fa3830b
Compare
…ages Prior to this commit, decorator handling logic in Ngtsc used `Error` to throw errors. This commit replaces most of these instances with `FatalDiagnosticError` class, which provider a better diagnostics error (including location of the problematic code).
57c5f9d
to
2c767ad
Compare
Thanks for the review @alxhub! I've applied the changes (to the code and commit msg) as you proposed. |
@mhevery only pre-existing failing targets are present in TAP presubmit after re-run, so this PR is ready to go. Thank you. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Prior to this commit, decorator handling logic in Ngtsc used
Error
to throw errors. This commit replaces most of these instances withFatalDiagnosticError
class, which provider a better diagnostics error (including location of the problematic code).This PR also adds tests for all places where
Error
was replaced withFatalDiagnosticError
.Resolves #34958.
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?