Skip to content
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

Adding Exception Handler #2887

Merged
merged 2 commits into from
Jul 9, 2023
Merged

Adding Exception Handler #2887

merged 2 commits into from
Jul 9, 2023

Conversation

dansiegel
Copy link
Member

Description of Change

This adds a MulticastExceptionHandler. This allows some flexibility in being able to provide more dynamic types which includes the ability to specify strongly typed Exception handlers for specific Exception types.

Bugs Fixed

API Changes

Adds public API's to the DelegateCommand for Catch<TException>

Behavioral Changes

When a Catch is specified this will attempt to catch any exception thrown during the execution of the command. If no delegate is registered for it, it will rethrow the exception.

NOTE for DelegateCommand<T> the protected implementation has been updated to no longer call the Execute(T parameter) and instead now will simply call the delegate directly. This is because we need to also allow developers to catch an InvalidCastException in the event that the UI Framework causes this error.

@dansiegel dansiegel added the Core label Jun 13, 2023
@dansiegel dansiegel added this to the Prism 9.0 milestone Jun 13, 2023
@dansiegel dansiegel enabled auto-merge June 13, 2023 14:48
@dansiegel dansiegel merged commit a128f20 into master Jul 9, 2023
@brianlagunas brianlagunas deleted the dev/ds/command-catch branch July 9, 2023 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement] Add Exception Handler to DelegateCommand
2 participants