[Mono-bugs] [Bug 75893][Nor] New - The after an exception the Err object doesn't set

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Wed Aug 24 04:59:25 EDT 2005

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 spek at impaq.com.pl.


--- shadow/75893	2005-08-24 04:59:25.000000000 -0400
+++ shadow/75893.tmp.11951	2005-08-24 04:59:25.000000000 -0400
@@ -0,0 +1,51 @@
+Bug#: 75893
+Product: Mono: Class Libraries
+Version: unspecified
+OS: Red Hat 9.0
+OS Details: Fedora Core
+Status: NEW   
+Priority: Normal
+Component: VB Runtime
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: spek at impaq.com.pl               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: The after an exception the Err object doesn't set
+Description of Problem:
+When I catch an exception the Err object doesn't contain additional 
+exception information.
+Steps to reproduce the problem:
+ Try
+      Throw New Exception("Test exception")
+    Catch ex As Exception
+      Console.WriteLine(" Error=" & Err.Number & " " & Err.Description)
+    End Try
+Actual Results:
+Unhandled Exception: System.NullReferenceException: Object reference not 
+set to an instance of an object
+in <0x00031> 
+(Int32 number)
+in <0x001b8> Microsoft.VisualBasic.ErrObject:MapExceptionToNumber 
+(System.Exception ex)
+in <0x00030> Microsoft.VisualBasic.ErrObject:get_Number ()
+in <0x00058> ProgressTestConsole.VBTest:Main ()
+Expected Results:
+Error=5 Test exception
+How often does this happen? 
+Additional Information:
+I know that .NET has different the exception handling model than Visual 
+Basic and the proper way is to use thw Exception object instead the Err.

More information about the mono-bugs mailing list