[Mono-bugs] [Bug 68552][Nor] New - Abort exception not properly rethrown in some cases

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Tue, 19 Oct 2004 14:40:35 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by lluis@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=68552

--- shadow/68552	2004-10-19 14:40:35.000000000 -0400
+++ shadow/68552.tmp.19742	2004-10-19 14:40:35.000000000 -0400
@@ -0,0 +1,70 @@
+Bug#: 68552
+Product: Mono: Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: lluis@ximian.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Abort exception not properly rethrown in some cases
+
+The abort exception is currently automatically rethrown in some scenarios
+where it should not.
+
+This is a test case:
+
+using System;
+using System.Threading;
+
+public class Test
+{
+	public static void Main ()
+	{
+		try {
+			Thread.CurrentThread.Abort ();
+		}
+		catch {
+			try { } catch {}
+			Console.WriteLine ("Hi");
+		}
+	}
+}
+
+The 'Hi' message is not printed, and it should. The inner catch somehow
+rethrows the exception.
+Another test case:
+
+using System;
+using System.Threading;
+
+public class Test
+{
+	public static void Main ()
+	{
+		try {
+			Thread.CurrentThread.Abort ();
+		}
+		catch {
+			SomeTest ();
+			Console.WriteLine ("Hi");
+		}
+	}
+	
+	public static void SomeTest ()
+	{
+		try { 
+			throw new Exception ("kk");
+		} catch {}
+	}
+}
+
+The abort exception is rethrown inside the SomeTest method, and it should
+be rethrown from the Main method.