[Mono-bugs] [Bug 73242][Maj] New - Thrown exception is not being caught by catch handler

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 2 Mar 2005 18:07:50 -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 wsf@fultondesigns.co.uk.

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

--- shadow/73242	2005-03-02 18:07:50.000000000 -0500
+++ shadow/73242.tmp.8146	2005-03-02 18:07:50.000000000 -0500
@@ -0,0 +1,74 @@
+Bug#: 73242
+Product: Mono: Compilers
+Version: 1.1
+OS: SUSE 9.1
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: C#
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: wsf@fultondesigns.co.uk               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Thrown exception is not being caught by catch handler
+
+Description of Problem:
+Thrown exception are not being caught by catch handler. It looks like this
+occurs when an exception is created and stored in a reference to the base
+class, Exception.
+
+Steps to reproduce the problem:
+Compile and run the attached c# file
+
+Actual Results (using Microsoft compiler):
+$ make mono && echo "all okay"
+mcs -out:runme.exe *.cs
+env PATH=".:$PATH" mono runme.exe
+Creating exception...
+about to throw exception...
+
+Unhandled Exception: System.ArgumentOutOfRangeException: out of range message
+Parameter name: parametername
+in <0x00043> example_runme:methodWhichThrows ()
+in <0x00099> example_runme:Main ()
+
+make: *** [mono] Error 1
+
+$ mcs --version
+Mono C# compiler version 1.1.4.0
+
+$ mono --version
+Mono JIT compiler version 1.1.4, (C) 2002-2004 Novell, Inc and
+Contributors. www
+.go-mono.com
+        TLS:           normal
+        GC:            Included Boehm (with typed GC)
+        SIGSEGV      : normal
+        Globalization: none
+
+
+
+Expected Results (using mono):
+$ make ms && echo "all okay"
+csc -out:runme.exe *.cs
+Microsoft (R) Visual C# .NET Compiler version 7.10.6001.4
+for Microsoft (R) .NET Framework version 1.1.4322
+Copyright (C) Microsoft Corporation 2001-2002. All rights reserved.
+
+env PATH=".:$PATH" ./runme.exe
+Creating exception...
+about to throw exception...
+Caught ArgumentOutOfRangeException - good
+Finished
+all okay
+
+
+How often does this happen? 
+Repeatedly
+
+Additional Information:
+Occurs in version 1.1.4 on both Windows and Linux (SuSe).