com.mentata.l3d
Class L3DException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.mentata.l3d.L3DException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SG8Exception

public class L3DException
extends Exception

An exception thrown within an L3D application. This class extends the standard Java Exception class and is used to define and manage unexpected behaviors or invalid cases in JLDAP or L3D method execution. On creation, an L3DException accepts numeric identifiers for error codes and/or a textual hint. Numeric identifiers are used to access a general description of the error from localized properties files.

Since:
0.7
Author:
Jon Roberts
See Also:
Serialized Form

Constructor Summary
L3DException(int code)
          Constructs an exception using properties defined for the given code.
L3DException(int code, String hint)
          Constructs an exception using properties defined for the given code.
L3DException(int code, String hint, Throwable cause)
          Constructs an exception using given code, cause, and hint.
 
Method Summary
 String getHint()
          Returns the hint assigned to the exception.
 int getL3DCode()
          Returns the code assigned to the exception.
 String getL3DMessage()
          Returns the message assigned to the exception.
 int getLDAPCode()
          Returns the code assigned to a causing exception.
 String getLDAPMessage()
          Returns the message assigned to a causing LDAP exception.
protected  Locale getLocale()
          Returns the assigned locale for the exception.
 void setLocale(Locale locale)
          Configures the locale for the exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

L3DException

public L3DException(int code)
Constructs an exception using properties defined for the given code.

Parameters:
code - the new error's identifier

L3DException

public L3DException(int code,
                    String hint)
Constructs an exception using properties defined for the given code.

Parameters:
code - the new error's identifier
hint - a key piece of information about the error

L3DException

public L3DException(int code,
                    String hint,
                    Throwable cause)
Constructs an exception using given code, cause, and hint.

Parameters:
code - the new error's identifier
hint - a key piece of information about the error
cause - the exception that provoked this L3D exception
Method Detail

getL3DCode

public int getL3DCode()
Returns the code assigned to the exception.

Returns:
the code number

getLDAPCode

public int getLDAPCode()
Returns the code assigned to a causing exception.

Returns:
the code number

getL3DMessage

public String getL3DMessage()
Returns the message assigned to the exception.

Returns:
the message

getLDAPMessage

public String getLDAPMessage()
Returns the message assigned to a causing LDAP exception.

Returns:
the message

getHint

public String getHint()
Returns the hint assigned to the exception.

Returns:
the hint

setLocale

public void setLocale(Locale locale)
Configures the locale for the exception.


getLocale

protected Locale getLocale()
Returns the assigned locale for the exception.

Returns:
the locale