feat(core): introduce @boundary control flow and programmatic error handling - #70463
Draft
JeanMeche wants to merge 6 commits into
Draft
feat(core): introduce @boundary control flow and programmatic error handling#70463JeanMeche wants to merge 6 commits into
@boundary control flow and programmatic error handling#70463JeanMeche wants to merge 6 commits into
Conversation
Implement error interception during refreshView and provide onError callback options in ViewContainerRef for programmatic rendering and encapsulation of boundary errors.
Add the runtime primitives `ɵɵboundaryCreate` and `ɵɵboundaryUpdate` to the core instructions, which handle synchronous view destruction and provide the `ON_ERROR` interceptor hooks. Also include the initial compiler AST representations for the new syntax including the Lexer tokenization and HTML Parser integration. This lays the foundational structure for `@boundary` prior to code generation. Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
JeanMeche
force-pushed
the
error-boundary
branch
2 times, most recently
from
August 29, 2026 00:45
5ec5d86 to
2a70304
Compare
Add support for `@boundary` blocks in the template type-checking pipeline.
Add support for the new `@boundary` and `@error` control flow blocks in the Angular Language Service. This includes: - Updating outlining spans to handle boundary blocks correctly. - Adding classification visitor methods for semantic tokens. - Adding template target visitor methods for navigation and hover support. - Updating the TextMate grammar to recognize `@boundary` and the `when` clause.
…ation Added some tests to ensure error boundaries work with SSR and hydration.
JeanMeche
force-pushed
the
error-boundary
branch
from
August 29, 2026 00:57
2a70304 to
c388ce6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces a declarative way to catch rendering errors in templates using the new
@boundaryblock, preventing local failures from crashing the entire application hierarchy.Additionally, this adds programmatic error handling for dynamically created views by introducing an
onErroroption toViewContainerRef.createComponent,createEmbeddedViewand the standalone alonecreateComponentfunction:Additional changes:
ErrorHandlercan now implementonViewError(err, details)to receive rich metadata about caught boundary errors.Note: most of design & implementation was done by @alxhub.
Note2: Docs on the feature will be addressed in a follow-up PR.