[Mono-bugs] [Bug 39632][Wis] New - Outer finally blocks skipped
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
Thu, 13 Mar 2003 07:21:18 -0500 (EST)
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 mathias.hasselmann@gmx.de.
http://bugzilla.ximian.com/show_bug.cgi?id=39632
--- shadow/39632 Thu Mar 13 07:21:18 2003
+++ shadow/39632.tmp.14938 Thu Mar 13 07:21:18 2003
@@ -0,0 +1,85 @@
+Bug#: 39632
+Product: Mono/Runtime
+Version: unspecified
+OS: GNU/Linux [Other]
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: mathias.hasselmann@gmx.de
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Outer finally blocks skipped
+
+Running mono 0.23 I've observed this behavior:
+
+If an exception is thrown and would have to pass several finally blocks
+before being caught only the very first finally block appears to be executed.
+
+Sample code:
+
+using System;
+public class TestTryFinally
+{
+ public static void TrivialMain()
+ {
+ int i = 123;
+ string s = "Some string";
+ object o = s;
+
+ try
+ {
+ // Illegal conversion; o contains a string not an int
+ i = (int) o;
+ }
+ finally
+ {
+ Console.WriteLine("i = {0}", i);
+ }
+ }
+
+ public static void Main()
+ {
+ try
+ {
+ try
+ {
+ TrivialMain();
+ }
+ finally
+ {
+ Console.WriteLine("cleaning up");
+ }
+ }
+ catch(Exception)
+ {
+ }
+ }
+}
+
+Actual Results:
+
+i = 123
+
+Expected Results:
+
+i = 123
+cleaning up
+
+How often does this happen?
+
+Always.
+
+Additional Information:
+
+According to the information in the changelog of bug 36252 there is some
+probability that following patch introduced the behavior:
+
+http://bugzilla.ximian.com/showattachment.cgi?attach_id=3260
+
+Reason: The code in exception3.cs looks like similiar to my example.