Skip to content

Commit

Permalink
feat(throw): fixed type issue with throw
Browse files Browse the repository at this point in the history
  • Loading branch information
zhifenglee-aelf committed Oct 28, 2024
1 parent 0793ccf commit c861dac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AElf.ExceptionHandler/ExceptionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ private Result HandleInnerException(Exception exception, MethodExecutionArgs arg

if (flowBehavior.ExceptionHandlingStrategy == ExceptionHandlingStrategy.Throw)
{
if (args.MethodInfo.ReturnType != typeof(Exception))
if (!typeof(Exception).IsAssignableFrom(args.MethodInfo.ReturnType))
{
throw new ReturnTypeMismatchException(
"Return type mismatch when trying to throw a new exception. ReturnValue should be of type Exception.");
Expand Down

0 comments on commit c861dac

Please sign in to comment.