[Mono-bugs] [Bug 82165][Nor] New - constructor exception has no line numbers
bugzilla-daemon at bugzilla.ximian.com
bugzilla-daemon at bugzilla.ximian.com
Mon Jul 23 14:30:00 EDT 2007
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 vgiszpenc at dsci.com.
http://bugzilla.ximian.com/show_bug.cgi?id=82165
--- shadow/82165 2007-07-23 14:30:00.000000000 -0400
+++ shadow/82165.tmp.20872 2007-07-23 14:30:00.000000000 -0400
@@ -0,0 +1,68 @@
+Bug#: 82165
+Product: Mono: Runtime
+Version: 1.2
+OS: other
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: debug
+AssignedTo: martin at ximian.com
+ReportedBy: vgiszpenc at dsci.com
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: constructor exception has no line numbers
+
+Description of Problem:
+When an exception is raised in a constructor, you don't get a line number.
+
+Steps to reproduce the problem:
+using System;
+
+class Foo
+{
+ public Foo()
+ {
+ Bar();
+ }
+ public void Bar()
+ {
+ throw new Exception();
+ }
+}
+class Example
+{
+ static void Main()
+ {
+ Foo foo = new Foo();
+ foo.Bar();
+ }
+}
+Actual Results:
+#: gmcs -debug Test.cs
+#: mono --debug Test.exe
+
+Unhandled Exception: System.Exception: Exception of type System.Exception
+was thrown.
+ at Foo.Bar () [0x00000] in /path/to/Test.cs:11
+ at Foo..ctor () [0x00000]
+ at Example.Main () [0x00000] in /path/to/Test.cs:18
+
+
+Expected Results:
+Unhandled Exception: System.Exception: Exception of type System.Exception
+was thrown.
+ at Foo.Bar () [0x00000] in /path/to/Test.cs:11
+ at Foo..ctor () [0x00000] in /path/to/Test.cs:7
+ at Example.Main () [0x00000] in /path/to/Test.cs:18
+
+
+How often does this happen?
+Whenever I have errors that cause runtime exceptions in constructors. Too
+often :).
+
+Additional Information:
+Thanks!
More information about the mono-bugs
mailing list