com.novell.nds.dirxml.driver.xds.util
Class DriverException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.novell.nds.dirxml.driver.xds.util.DriverException
All Implemented Interfaces:
Serializable

public class DriverException
extends Exception

A useful exception wrapper intended to reduce the complexity of try/catch blocks as well as provide additional context information for exceptions to assist in debugging efforts.

See Also:
Serialized Form

Field Summary
static int CAT_AUTH
           
static int CAT_CONNECT
           
static int CAT_ERROR
           
static int CAT_FATAL
           
static int CAT_RETRY
           
 
Constructor Summary
DriverException(String someMessage)
          Creates a new DriverException object.
 
Method Summary
 void addThrowables(List someThrowables)
          Adds a list of Throwable objects to this exception.
 void addThrowble(Throwable someThrowable)
          Adds a single Throwable object to this exception.
 void appendPostMessage(String someMessage)
          Appends a message after the current message.
 void appendPreMessage(String someMessage)
          Appends a message before the current message.
 boolean getAppendDocument()
          Should the document that caused this exception be output?
 com.novell.nds.dirxml.driver.XmlDocument getDocument()
          Returns the XML document associated with this exception.
 String getEventID()
          Returns the event ID associated with this exception.
 StatusLevel getLevel()
          Returns the status level of this exception.
 String getMessage()
          Returns this exception's message.
 boolean getPrintStackTrace()
          Should the stack trace of each contained Throwable be output?
 List getThrowables()
          Returns the List of Throwables contained by this exception.
 StatusType getType()
          Returns the status type of this exception.
 boolean isAuthenticationRelated()
          Does this exception represent an authentication-related error condition?
 boolean isConnectivityRelated()
          Does this exception represent a connectivity-related error condition?
 boolean isFatal()
          Does this exception represent a fatal error condition?
 boolean isRetry()
          Does this exception represent a connectivity-related error condition?
 boolean isSpecialCondition()
          Does this exception require special handling?
 void setAppendDocument(boolean value)
          Sets whether the document associated with this exception should be output?
 void setCategory(int someCategory)
          Sets the category of this exception.
 void setDocument(com.novell.nds.dirxml.driver.XmlDocument someDoc)
          Sets the XML document associated with this exception.
 void setEventID(String someID)
          Sents the event ID associated with this exception.
 void setLevel(StatusLevel someLevel)
          Sets the status level of this exception.
 void setPrintStackTrace(boolean value)
          Sets whether the stack trace of each contained Throwable should be output?
 void setType(StatusType someType)
          Sets the status type of this exception.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CAT_ERROR

public static final int CAT_ERROR
See Also:
Constant Field Values

CAT_AUTH

public static final int CAT_AUTH
See Also:
Constant Field Values

CAT_CONNECT

public static final int CAT_CONNECT
See Also:
Constant Field Values

CAT_RETRY

public static final int CAT_RETRY
See Also:
Constant Field Values

CAT_FATAL

public static final int CAT_FATAL
See Also:
Constant Field Values
Constructor Detail

DriverException

public DriverException(String someMessage)
Creates a new DriverException object.

Parameters:
someMessage - may be null
Method Detail

appendPreMessage

public void appendPreMessage(String someMessage)
Appends a message before the current message.

Parameters:
someMessage - may be null

appendPostMessage

public void appendPostMessage(String someMessage)
Appends a message after the current message.

Parameters:
someMessage - may be null

addThrowables

public void addThrowables(List someThrowables)
Adds a list of Throwable objects to this exception.

Parameters:
someThrowables - may be null

addThrowble

public void addThrowble(Throwable someThrowable)
Adds a single Throwable object to this exception.

Parameters:
someThrowable - may be null

setPrintStackTrace

public void setPrintStackTrace(boolean value)
Sets whether the stack trace of each contained Throwable should be output?

Parameters:
value - true or false

setAppendDocument

public void setAppendDocument(boolean value)
Sets whether the document associated with this exception should be output?

Parameters:
value - true or false

getAppendDocument

public boolean getAppendDocument()
Should the document that caused this exception be output?

Returns:
true or false

getPrintStackTrace

public boolean getPrintStackTrace()
Should the stack trace of each contained Throwable be output?

Returns:
true or false

getThrowables

public List getThrowables()
Returns the List of Throwables contained by this exception.

Returns:
will not return null

setLevel

public void setLevel(StatusLevel someLevel)
Sets the status level of this exception.

Parameters:
someLevel - may be null

getLevel

public StatusLevel getLevel()
Returns the status level of this exception.

Returns:
may return null

setType

public void setType(StatusType someType)
Sets the status type of this exception.

Parameters:
someType - may be null

getType

public StatusType getType()
Returns the status type of this exception.

Returns:
may return null

setCategory

public void setCategory(int someCategory)
Sets the category of this exception.

Parameters:
someCategory - should be a legal value as defined in this class

isFatal

public boolean isFatal()
Does this exception represent a fatal error condition?

Returns:
true or false

isAuthenticationRelated

public boolean isAuthenticationRelated()
Does this exception represent an authentication-related error condition?

Returns:
true or false

isConnectivityRelated

public boolean isConnectivityRelated()
Does this exception represent a connectivity-related error condition?

Returns:
true or false

isSpecialCondition

public boolean isSpecialCondition()
Does this exception require special handling?

That is, does it represent a specific error condition or just a general one.

Returns:
true if specific; false otherwise

isRetry

public boolean isRetry()
Does this exception represent a connectivity-related error condition?

Returns:
true or false

getMessage

public String getMessage()
Returns this exception's message.

Returns:
will not return null

setDocument

public void setDocument(com.novell.nds.dirxml.driver.XmlDocument someDoc)
Sets the XML document associated with this exception.

Parameters:
someDoc - may be null

getDocument

public com.novell.nds.dirxml.driver.XmlDocument getDocument()
Returns the XML document associated with this exception.

Returns:
may return null

setEventID

public void setEventID(String someID)
Sents the event ID associated with this exception.

Parameters:
someID - may be null

getEventID

public String getEventID()
Returns the event ID associated with this exception.

Returns:
may return null