Skip to content

Commit 70c5800

Browse files
committed
Clean up Python wrapper exception
1 parent 4a6fba8 commit 70c5800

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Common/Util/PythonUtil.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,7 @@ public static T CreateModelOrWrapper<T, TWrapper>(PyObject pyObject)
388388
}
389389
catch (TargetInvocationException ex)
390390
{
391-
if (ex.InnerException != null)
392-
{
393-
throw ex.InnerException;
394-
}
395-
throw;
391+
throw ex.InnerException ?? ex;
396392
}
397393
}
398394
}

0 commit comments

Comments
 (0)