ariba.util.core
Class WrappedException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.reflect.InvocationTargetException
              extended by ariba.util.core.WrappedException
All Implemented Interfaces:
java.io.Serializable

public class WrappedException
extends java.lang.reflect.InvocationTargetException

a generic exception subclass for all exceptions thrown. It wraps the the exception thrown by its subclasses and incorporates the exception in its getMessage method.

See Also:
Serialized Form

Field Summary
static int SevError
          Severity level for Error.
static int SevFatal
          Severity level for Fatal.
static int SevWarning
          Severity level for Warning.
 
Constructor Summary
WrappedException(java.lang.Exception anException)
          Construct with an exception - will copy message from the exception and create it with severity Error.
WrappedException(java.lang.String aMessage)
          Constructor with message.
WrappedException(java.lang.String aMessage, java.lang.Exception anException)
          Specifies a message and an exception to wrap
WrappedException(java.lang.String aMessage, int severity)
          Constructor with message and severity
WrappedException(java.lang.String aMessage, int severity, java.lang.Exception anException)
          Specifies a message, a severity and an exception to wrap.
 
Method Summary
 java.lang.String getMessage()
          return the passed in message
 int getSeverity()
          Get the severity of the exception.
 java.lang.Exception getWrappedException()
          Returns the wrapped exception
 void printStackTrace(java.io.PrintStream s)
          Print the stack trace to the provided PrintStream
 void printStackTrace(java.io.PrintWriter s)
          Print the stack trace to the provided PrintWriter
 
Methods inherited from class java.lang.reflect.InvocationTargetException
getCause, getTargetException
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SevWarning

public static final int SevWarning
Severity level for Warning.

See Also:
Constant Field Values

SevError

public static final int SevError
Severity level for Error. This is the default severity.

See Also:
Constant Field Values

SevFatal

public static final int SevFatal
Severity level for Fatal.

See Also:
Constant Field Values
Constructor Detail

WrappedException

public WrappedException(java.lang.String aMessage)
Constructor with message.

Parameters:
aMessage - the error message

WrappedException

public WrappedException(java.lang.String aMessage,
                        int severity)
Constructor with message and severity

Parameters:
aMessage - the error message
severity -

WrappedException

public WrappedException(java.lang.String aMessage,
                        java.lang.Exception anException)
Specifies a message and an exception to wrap

Parameters:
aMessage - the error message
anException - the embedded exception

WrappedException

public WrappedException(java.lang.Exception anException)
Construct with an exception - will copy message from the exception and create it with severity Error.

Parameters:
anException - the embedded exception

WrappedException

public WrappedException(java.lang.String aMessage,
                        int severity,
                        java.lang.Exception anException)
Specifies a message, a severity and an exception to wrap.

Parameters:
aMessage - the error message
severity -
anException - the embedded exception
Method Detail

getMessage

public java.lang.String getMessage()
return the passed in message

Overrides:
getMessage in class java.lang.Throwable
Returns:
the message string

getWrappedException

public java.lang.Exception getWrappedException()
Returns the wrapped exception

Returns:
the embedded exception

getSeverity

public int getSeverity()
Get the severity of the exception.

Returns:
the severity of the exception.

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Print the stack trace to the provided PrintWriter

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - the output print writer

printStackTrace

public void printStackTrace(java.io.PrintStream s)
Print the stack trace to the provided PrintStream

Overrides:
printStackTrace in class java.lang.Throwable
Parameters:
s - the ouput print stream


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.