diff options
Diffstat (limited to 'mcs/class/corlib/corert/RuntimeAugments.cs')
-rw-r--r-- | mcs/class/corlib/corert/RuntimeAugments.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mcs/class/corlib/corert/RuntimeAugments.cs b/mcs/class/corlib/corert/RuntimeAugments.cs index c1dc3f3cb93..b55c5ea9a4c 100644 --- a/mcs/class/corlib/corert/RuntimeAugments.cs +++ b/mcs/class/corlib/corert/RuntimeAugments.cs @@ -1,5 +1,6 @@ using System; using System.Reflection; +using System.Runtime.ExceptionServices; namespace Internal.Runtime.Augments { partial class RuntimeAugments { @@ -7,7 +8,8 @@ namespace Internal.Runtime.Augments { public static void ReportUnhandledException (Exception exception) { - throw exception; + var edi = ExceptionDispatchInfo.Capture (exception); + edi.Throw (); } internal static ReflectionExecutionDomainCallbacks Callbacks => s_reflectionExecutionDomainCallbacks; @@ -19,4 +21,4 @@ namespace Internal.Runtime.Augments { return new MissingMetadataException (); } } -}
\ No newline at end of file +} |