Subject: IllegalArgumentException (WG last call on the Java API)

From: "Steve Sonntag" <[email-masked]>
Date: Mon, 26 Mar 2001 10:14:23 -0700

Rob,

One thing that is confusing to me is the following:

When does a method throw LDAPException with PARAM_ERROR
vs
throwing IllegalArgumentException

I realize thatthe method in the discussion below
does not throw LDAPException but many others do.
How does one determine which of the two exceptions is thrown?

-Steve

------------------------
Steve Sonntag
Novell, Inc., the leading provider of Net services software

>>> Rob Weltman <[email-masked]> 25-Mar-01 5:10:49 PM >>>
"Kurt D. Zeilenga" wrote:
> 
> >4.11 public class LDAPDN
> > A utility class representing a distinguished name (DN).
> >
> >4.11.1 equals
> > public static boolean equals(String dn1, String dn2)
> >
> > Returns true if the two strings correspond to the same DN, after
> > appropriate normalization.
> 
> What if either DN is invalid?

 IllegalArgumentException is thrown.

---

From: "Kurt D. Zeilenga" <[email-masked]>
Date: Mon, 26 Mar 2001 11:38:45 -0800

At 10:14 AM 3/26/01 -0700, Steve Sonntag wrote: 
>I realize that the method in the discussion below

I'd suggest doing away with PARAM_ERROR and always
using IllegalArgumentException...  In fact, I suggest
doing away with all LDAPExceptions with API specific
result codes in favor of other Exceptions.

Kurt