Skip to content

Conversation

@crisbeto
Copy link
Member

Adds an ngDevMode check before a runtime error message.

@crisbeto crisbeto added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release labels Jul 18, 2024
@ngbot ngbot bot added this to the Backlog milestone Jul 18, 2024
@crisbeto crisbeto force-pushed the 57034/to-signal-error branch from 3e5875e to 55c415b Compare July 18, 2024 09:12
@crisbeto crisbeto force-pushed the 57034/to-signal-error branch from 55c415b to 9567497 Compare July 18, 2024 09:21
Adds an `ngDevMode` check before a runtime error message.

Fixes angular#57034.
@crisbeto crisbeto force-pushed the 57034/to-signal-error branch from 9567497 to bf423ef Compare July 18, 2024 09:46
case StateKind.NoValue:
// This shouldn't really happen because the error is thrown on creation.
// TODO(alxhub): use a RuntimeError when we finalize the error semantics
throw new ɵRuntimeError(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: sounds like a repeated code - would it make sense to pull it out into a utility function?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the only repeated code is half of the if statement (kind === StateKind.NoValue)and thethrow new RuntimeError` so I'm not sure it's worth it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeh, but I'm not thrilled about having the error message in 2 places.

@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: review The PR is still awaiting reviews from at least one requested reviewer merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note labels Jul 22, 2024
@atscott
Copy link
Contributor

atscott commented Jul 22, 2024

This PR was merged into the repository by commit fe41b11.

The changes were merged into the following branches: main, 18.1.x

@atscott atscott closed this in fe41b11 Jul 22, 2024
atscott pushed a commit that referenced this pull request Jul 22, 2024
Adds an `ngDevMode` check before a runtime error message.

Fixes #57034.

PR Close #57035
vladboisa pushed a commit to vladboisa/angular that referenced this pull request Jul 29, 2024
Adds an `ngDevMode` check before a runtime error message.

Fixes angular#57034.

PR Close angular#57035
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants