-
-
Save radical/26d9b11e185353ea4f869ce3fbeaf61a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/mono/tests/exception20.cs b/mono/tests/exception20.cs | |
index 3337a7fe294..37ce9bfc9d7 100644 | |
--- a/mono/tests/exception20.cs | |
+++ b/mono/tests/exception20.cs | |
@@ -13,12 +13,21 @@ class C | |
{ | |
static CustomException e; | |
+ [MethodImpl(MethodImplOptions.NoInlining)] | |
+ static void ThrowCustomException () | |
+ { | |
+ throw new CustomException(1); | |
+ } | |
+ | |
+ [MethodImpl(MethodImplOptions.NoInlining)] | |
static void Throw () | |
{ | |
try { | |
- throw new CustomException(1); | |
+ ThrowCustomException (); | |
} catch (CustomException ex) { | |
e = ex; | |
+ // so, the original exception has two frames | |
+ CheckTrace (e, 2); | |
} | |
} | |
@@ -76,6 +85,8 @@ class C | |
// Single frame | |
// Filter returns false | |
+ // Original exception @e had two frames, but after throwing here it | |
+ // should have just 1 | |
try { | |
throw e; | |
} catch (Exception ex) when (CheckTrace (ex, 1, true)) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment