[Mono-bugs] [Bug 52064][Maj] New - All functions in Microsoft.VisualBasic assembly MUST set the error information (Err object) before throwing the exception
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sat, 3 Jan 2004 05:30:48 -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 jwezel@compumaster.de.
http://bugzilla.ximian.com/show_bug.cgi?id=52064
--- shadow/52064 2004-01-03 05:30:48.000000000 -0500
+++ shadow/52064.tmp.9506 2004-01-03 05:30:48.000000000 -0500
@@ -0,0 +1,76 @@
+Bug#: 52064
+Product: Mono/Compilers
+Version: unspecified
+OS: unknown
+OS Details:
+Status: NEW
+Resolution:
+Severity: Unknown
+Priority: Major
+Component: Basic
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: rafaelteixeirabr@hotmail.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: All functions in Microsoft.VisualBasic assembly MUST set the error information (Err object) before throwing the exception
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+
+All functions in Microsoft.VisualBasic assembly MUST set the error
+information (Err object) before throwing the exception.
+For example, in the Right() funtion, if a negative number is passed as the
+length we must set Err.Number = 5, before throwing ArgumentOutOfRangeException.
+
+Steps to reproduce the problem:
+1. Have to cook some test code, yet!!!
+2.
+3.
+
+Actual Results:
+
+
+Expected Results:
+
+
+How often does this happen?
+
+Always, we've not implemented any of it
+
+Additional Information:
+
+------- Additional Comments From jwezel@compumaster.de 2004-01-03 05:30 -------
+Bug problem description is inappropriate; as shown by the following
+sample, this is not the Right() method but EITHER the exception
+itself who sets up this err.number OR it is the Err object itself,
+that is wrapping the different exception classes into numbers
+
+Code below runs on MS .NET with vbc.exe compilation:
+
+Imports Microsoft.VisualBasic
+Imports System
+Imports System.IO
+Public Class Test
+Public Shared Sub Main()
+ ErrObjTests
+ Console.Readline()
+End Sub
+shared sub ErrObjTests
+try
+ throw new ArgumentOutOfRangeException ("blah") ' --> No. 5
+ throw new OverflowException ("blah") ' --> No. 6
+ throw new Exception ("blah") ' --> No. 5
+
+catch ex as exception
+ If err.number<> 0 then Console.Writeline("ErrDescr=" &
+err.description)
+ If err.number<> 0 then Console.Writeline("ErrNo=" &
+err.number)
+Console.Writeline("Exception=" & ex.message)
+end try
+end sub
+End Class
+