[Mono-bugs] [Bug 70172][Wis] New - LDAP exception not caught by the catch block
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Fri, 3 Dec 2004 01:54:40 -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 lists@munshi.biz.
http://bugzilla.ximian.com/show_bug.cgi?id=70172
--- shadow/70172 2004-12-03 01:54:40.000000000 -0500
+++ shadow/70172.tmp.7130 2004-12-03 01:54:40.000000000 -0500
@@ -0,0 +1,81 @@
+Bug#: 70172
+Product: Mono: Runtime
+Version: 1.0
+OS:
+OS Details: NLD 9, SLP9.2
+Status: NEW
+Resolution:
+Severity:
+Priority: Wishlist
+Component: JIT
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: lists@munshi.biz
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: LDAP exception not caught by the catch block
+
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+
+static void Main()
+{
+ try {
+ LdapConnection ldapConn = new LdapConnection();
+ ldapConn.Connect("localhost",389);
+ ldapConn.Bind("cn=Manager,dc=example,dc=com","secret");
+ }
+ catch(Exception e)
+ {
+ Console.WriteLine("Error :" + e.ToString());
+ }
+}
+
+If dc=example,dc=com does not exist in the LDAP database, it throws an
+exception, but my generic catch block does not catch it.
+Following is the output
+
+
+Unhandled Exception: System.ArgumentNullException: Argument cannot be
+null.
+in <0x00078> System.String:FormatHelper
+(System.Text.StringBuilder,System.IFormatProvider,string,object[])
+in <0x0003d> System.String:Format (System.IFormatProvider,string,object[])
+in <0x00175> Novell.Directory.Ldap.Utilclass.ResourcesHandler:getMessage
+(string,object[],System.Globalization.CultureInfo)
+in <0x00013> Novell.Directory.Ldap.Utilclass.ResourcesHandler:getMessage
+(string,object[])
+in <0x000bf> Novell.Directory.Ldap.LdapException:getExceptionString
+(string)
+in <0x00013> Novell.Directory.Ldap.LdapException:ToString ()
+in <0x00284> Munshi.Amish.LDAP.amish:Main ()
+
+
+The program hangs and does not quit.
+
+
+Steps to reproduce the problem:
+1. Compile the above program.
+2.
+3.
+
+
+
+Actual Results:
+Unhandled exception.
+
+
+
+Expected Results:
+catch block should accept the exception.
+
+
+
+How often does this happen?
+Always.
+
+
+
+Additional Information: