diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs b/csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs index 8f4c937293..11a24d93ac 100644 --- a/csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs +++ b/csharp/src/Microsoft.ML.OnnxRuntime/SessionOptions.cs @@ -96,7 +96,7 @@ namespace Microsoft.ML.OnnxRuntime catch (Exception e) { options.Dispose(); - throw; + throw e; } }