You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the user is using EasyCommand.AspNetCore and the user has registered a custom handler and created commands. When a command raises an exception this exception type is wrapped in another exception raised in the handlers AfterExecutionAsync method. This breaks any catches on specific exception types outside of the command.
So with
if GetCommand throws SpecificException this will not be caught. Instead an exception of type Exception will be thrown with an inner exception of SpecificException
The text was updated successfully, but these errors were encountered:
This is by design, however the fact that it is throwing a generic System.Exception is probably not the best solution to this and it feels ambiguous. This should be changed instead to a custom exception that indicates that the handler has failed in running the command
Given the user is using EasyCommand.AspNetCore and the user has registered a custom handler and created commands. When a command raises an exception this exception type is wrapped in another exception raised in the handlers AfterExecutionAsync method. This breaks any catches on specific exception types outside of the command.
So with
if GetCommand throws SpecificException this will not be caught. Instead an exception of type Exception will be thrown with an inner exception of SpecificException
The text was updated successfully, but these errors were encountered: