diff --git a/AElf.ExceptionHandler/ExceptionHandler.cs b/AElf.ExceptionHandler/ExceptionHandler.cs index cf15cff..f7f413b 100644 --- a/AElf.ExceptionHandler/ExceptionHandler.cs +++ b/AElf.ExceptionHandler/ExceptionHandler.cs @@ -275,7 +275,7 @@ private Result HandleInnerException(Exception exception, MethodExecutionArgs arg if (flowBehavior.ExceptionHandlingStrategy == ExceptionHandlingStrategy.Throw) { - if (!typeof(Exception).IsAssignableFrom(args.MethodInfo.ReturnType)) + if (!(flowBehavior.ReturnValue is Exception)) { throw new ReturnTypeMismatchException( "Return type mismatch when trying to throw a new exception. ReturnValue should be of type Exception.");