feature(core): exception handling#536
Merged
Citymonstret merged 9 commits into2.0.0-devfrom Dec 3, 2023
Merged
Conversation
This introduces a new exception handling system that allows us to register exception handlers for both the precise exception types _and_ their super types. This system also allows us to register multiple exception handlers for the same exception type.
b9cf73f to
b0e6287
Compare
Citymonstret
pushed a commit
that referenced
this pull request
Dec 2, 2023
builds on top of #536 to add annotated exception handler methods
Closed
Konicai
reviewed
Dec 4, 2023
| } | ||
|
|
||
| /** | ||
| * Returns an exception handler that throws the cause of the {@link ExceptionContext#exception()} if it's and instance |
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.
This introduces a new exception handling system that allows us to register exception handlers for both the precise exception types and their super types. This system also allows us to register multiple exception handlers for the same exception type.
We might want to add some utilities to make it easier to unwrap exceptions such asThis has (kind of) been resolved by addingCommandExecutionException. This isn't strictly necessary as we have the ability to re-throw the wrapped type. However, it's probably not ideal for everyone to have to implement this on their own.ExceptionHandler.unwrappingHandler().Before we make use of this API in the platform implementations I want to make sure that it's refined. Feedback is very welcome :)