com.waveset.util
Class WavesetException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycom.waveset.util.ExceptionWrapper
              extended bycom.waveset.util.WavesetException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AlreadyExists, ConfigurationError, ConflictingAttributeSet, DeprovisionRequired, Form.InvalidFieldValue, FormState.MissingRequiredField, FormValidation, InternalError, InvalidArgument, InvalidXmlString, IOException, ItemNotFound, ItemNotLocked, LimitExceeded, LockedByAnother, MissingAttribute, MultipleAttributeSet, NotifierInternalError, NotInitialized, ObjectInUse, ObjectProtected, OperationTimedOut, PolicyMissing, PolicyViolation, PriorTaskResults, ReportTerminated, RoleExclusion, ServiceNotResponding, Shutdown, TaskExists, TreeContentAdapterException, TreeContentAdapterFactoryException, TreeContentFilterException, UnsupportedOperationException, ValidationFailed, WSAuthorizationException, WSCredentialsTimeoutException, WSLoginException, WSPasswordChangeLimitException, WSSessionTerminatedException, XmlParseException, XmlParserException

public class WavesetException
extends ExceptionWrapper

The base exception thrown by Waveset components.

See Also:
Serialized Form

Field Summary
static java.lang.String code_id
           
 
Constructor Summary
WavesetException()
          Construct a ExceptionWrapper with no message or nested throwable.
WavesetException(ErrorMessage msg)
          Construct a new WavesetException with a detailed message supplied as a Message object.
WavesetException(ErrorMessage msg, java.lang.Throwable e)
          Construct a new WavesetException that wraps an existing exception, and has its own detailed message supplied as a Message object
WavesetException(java.util.List msgs)
          Construct a new WavesetException with a list of messages.
WavesetException(Message msg)
          Deprecated. as of release 7.0, replaced by WavesetException(ErrorMessage).
WavesetException(Message msg, java.lang.Throwable e)
          Deprecated. as of release 7.0, replaced by WavesetException(ErrorMessage, Throwable).
WavesetException(java.lang.String message)
          Deprecated. as of release 7.0, replaced by WavesetException(String, Severity).
WavesetException(java.lang.String message, Severity severity)
          Construct a new WavesetException with a detailed error message.
WavesetException(java.lang.String message, Severity severity, java.lang.Throwable e)
          Create a new WavesetException from an existing exception.
WavesetException(java.lang.String message, java.lang.Throwable e)
          Deprecated. as of release 7.0, replaced by WavesetException(String, Severity, Throwable).
WavesetException(java.lang.Throwable e)
          Construct a new WavesetException wrapping an existing exception.
 
Method Summary
 void addMessage(Message msg)
          Add an additional message to the exception.
 void addMessage(Message msg, int index)
          Add an additional message to the exception.
 void breakpoint()
          Called when an exception is constructed, and breakpoints are enabled.
 void checkBreakpoint()
          Called when exceptions are constructred.
static void enableBreakpoint(boolean b)
          Enables or disables exception breakpoints.
 java.lang.String getLocalizedMessage()
          Get the localized error message, overloaded from Throwable.
 java.lang.String getLocalizedMessage(java.util.Locale locale)
          Get the localized error message, overloaded from Throwable.
 java.lang.String getMessage()
          Get the default message, overloaded from Throwable.
 java.lang.String getMessage(boolean includeWrapped, java.util.Locale locale)
          Render the messages for this exception.
 void getMessage(java.lang.StringBuffer b, boolean includeWrapped, java.util.Locale locale)
          Render the messages for this exception.
 java.lang.Object getMessageObject()
          Get the default message.
 java.lang.Object getMessageObject(java.util.Locale locale)
           
 java.lang.String getMessageOnly()
          Get the default message, overloaded from Throwable.
 java.util.List getMessages()
          Gets the list of message objects associated with this exception.
 
Methods inherited from class com.waveset.util.ExceptionWrapper
addException, clearExceptions, describeException, getAllMessages, getException, getException, getExceptionCount, hasException, printStackTrace, printStackTrace, printStackTrace, removeException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values
Constructor Detail

WavesetException

public WavesetException()
Construct a ExceptionWrapper with no message or nested throwable.


WavesetException

public WavesetException(Message msg)
Deprecated. as of release 7.0, replaced by WavesetException(ErrorMessage).

Construct a new WavesetException with a detailed message supplied as a Message object.

Parameters:
msg - detail message

WavesetException

public WavesetException(ErrorMessage msg)
Construct a new WavesetException with a detailed message supplied as a Message object.

Parameters:
msg - detail message

WavesetException

public WavesetException(java.util.List msgs)
Construct a new WavesetException with a list of messages.


WavesetException

public WavesetException(Message msg,
                        java.lang.Throwable e)
Deprecated. as of release 7.0, replaced by WavesetException(ErrorMessage, Throwable).

Construct a new WavesetException that wraps an existing exception, and has its own detailed message supplied as a Message object

Parameters:
msg - detail message

WavesetException

public WavesetException(ErrorMessage msg,
                        java.lang.Throwable e)
Construct a new WavesetException that wraps an existing exception, and has its own detailed message supplied as a Message object

Parameters:
msg - detail message

WavesetException

public WavesetException(java.lang.String message)
Deprecated. as of release 7.0, replaced by WavesetException(String, Severity).

Construct a new WavesetException with a detailed message.


WavesetException

public WavesetException(java.lang.String message,
                        Severity severity)
Construct a new WavesetException with a detailed error message.


WavesetException

public WavesetException(java.lang.Throwable e)
Construct a new WavesetException wrapping an existing exception.

The existing exception will be embedded in the new one, and its message will become the default message for the WavesetException.


WavesetException

public WavesetException(java.lang.String message,
                        java.lang.Throwable e)
Deprecated. as of release 7.0, replaced by WavesetException(String, Severity, Throwable).

Create a new WavesetException from an existing exception.

The existing exception will be embedded in the new one, but the new exception will have its own message.


WavesetException

public WavesetException(java.lang.String message,
                        Severity severity,
                        java.lang.Throwable e)
Create a new WavesetException from an existing exception.

The existing exception will be embedded in the new one, but the new exception will have its own message.

Method Detail

addMessage

public void addMessage(Message msg)
Add an additional message to the exception.


addMessage

public void addMessage(Message msg,
                       int index)
Add an additional message to the exception.


getMessages

public java.util.List getMessages()
Gets the list of message objects associated with this exception.


getMessage

public void getMessage(java.lang.StringBuffer b,
                       boolean includeWrapped,
                       java.util.Locale locale)
Render the messages for this exception. This is the core method, it can be called from various paths including Throwable's getMessage and getLocalizedMessage that we overload.

Call this if you need control.


getMessage

public java.lang.String getMessage(boolean includeWrapped,
                                   java.util.Locale locale)
Render the messages for this exception.


getLocalizedMessage

public java.lang.String getLocalizedMessage()
Get the localized error message, overloaded from Throwable.

Should be deferred until a point where we know the locale of th end-user.


getLocalizedMessage

public java.lang.String getLocalizedMessage(java.util.Locale locale)
Get the localized error message, overloaded from Throwable.

Should be deferred until a point where we know the locale of th end-user.


getMessage

public java.lang.String getMessage()
Get the default message, overloaded from Throwable. This is what toString will call.

Overrides:
getMessage in class ExceptionWrapper

getMessageObject

public java.lang.Object getMessageObject()
Get the default message. If ErrorMessage objects are detected in the messages list, return the message object as an ErrorMessage with the highest Severity detected. Otherwise, return the string message.


getMessageObject

public java.lang.Object getMessageObject(java.util.Locale locale)

getMessageOnly

public java.lang.String getMessageOnly()
Get the default message, overloaded from Throwable. This is what toString will call.


enableBreakpoint

public static void enableBreakpoint(boolean b)
Enables or disables exception breakpoints.


checkBreakpoint

public void checkBreakpoint()
Called when exceptions are constructred.

If breakpoints are enabled, call breakpoint(). This extra leve is so tests can disable exception breakpoints when they are doing something that is known to produce an exception, but you don't want to stop the debugger.


breakpoint

public void breakpoint()
Called when an exception is constructed, and breakpoints are enabled. A handy place to set a debugger breakpoint.