org.jboss.mq
Class SpyJMSException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjavax.jms.JMSException (src) 
              extended byorg.jboss.mq.SpyJMSException
All Implemented Interfaces:
NestedThrowable (src) , java.io.Serializable
Direct Known Subclasses:
DestinationFullException (src)

public class SpyJMSException
extends JMSException (src)
implements NestedThrowable (src)

A common superclass for JMSException classes that can contain a nested Throwable detail object.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.jboss.util.NestedThrowable (src)
NestedThrowable.Util (src)
 
Field Summary
protected  java.lang.Throwable nested
          The nested throwable
 
Fields inherited from interface org.jboss.util.NestedThrowable (src)
DETECT_DUPLICATE_NESTING, NESTED_TRACE_ENABLED, PARENT_TRACE_ENABLED
 
Constructor Summary
SpyJMSException(java.lang.String msg)
          Construct a SpyJMSException with the specified detail message.
SpyJMSException(java.lang.String msg, java.lang.String code)
          Construct a SpyJMSException with the specified detail message and error code.
SpyJMSException(java.lang.String msg, java.lang.Throwable nested)
          Construct a SpyJMSException with the specified detail message and nested Throwable.
SpyJMSException(java.lang.Throwable nested)
          Construct a SpyJMSException with the specified nested Throwable.
 
Method Summary
static JMSException (src) getAsJMSException(java.lang.String message, java.lang.Throwable t)
          Converts a throwable to a JMSException if it is not already
 java.lang.Throwable getCause()
          Return the nested Throwable.
 java.lang.Exception getLinkedException()
          Gets the exception linked to this one.
 java.lang.String getMessage()
           
 java.lang.Throwable getNested()
          Return the nested throwable.
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream stream)
           
 void printStackTrace(java.io.PrintWriter writer)
           
static void rethrowAsJMSException(java.lang.String message, java.lang.Throwable t)
          Converts a throwable to a JMSException if it is not already
 void setLinkedException(java.lang.Exception e)
          Adds a linked Exception.
 
Methods inherited from class javax.jms.JMSException (src)
getErrorCode
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nested

protected java.lang.Throwable nested
The nested throwable

Constructor Detail

SpyJMSException

public SpyJMSException(java.lang.String msg)
Construct a SpyJMSException with the specified detail message.

Parameters:
msg - Detail message.

SpyJMSException

public SpyJMSException(java.lang.String msg,
                       java.lang.String code)
Construct a SpyJMSException with the specified detail message and error code.

Parameters:
msg - Detail message.
code - Error code.

SpyJMSException

public SpyJMSException(java.lang.String msg,
                       java.lang.Throwable nested)
Construct a SpyJMSException with the specified detail message and nested Throwable.

Parameters:
msg - Detail message.
nested - Nested Throwable.

SpyJMSException

public SpyJMSException(java.lang.Throwable nested)
Construct a SpyJMSException with the specified nested Throwable.

Parameters:
nested - Nested Throwable.
Method Detail

rethrowAsJMSException

public static void rethrowAsJMSException(java.lang.String message,
                                         java.lang.Throwable t)
                                  throws JMSException (src) 
Converts a throwable to a JMSException if it is not already

Parameters:
message - any message to add to a constructed JMSException
t - the throwable
Throws:
JMSException (src) - always

getAsJMSException

public static JMSException (src)  getAsJMSException(java.lang.String message,
                                             java.lang.Throwable t)
Converts a throwable to a JMSException if it is not already

Parameters:
message - any message to add to a constructed JMSException
t - the throwable
Returns:
a JMSException

setLinkedException

public void setLinkedException(java.lang.Exception e)
Description copied from class: JMSException (src)
Adds a linked Exception.

Overrides:
setLinkedException in class JMSException (src)
Parameters:
e - the linked Exception

getLinkedException

public java.lang.Exception getLinkedException()
Description copied from class: JMSException (src)
Gets the exception linked to this one.

Overrides:
getLinkedException in class JMSException (src)
Returns:
the linked Exception, null if none

getNested

public java.lang.Throwable getNested()
Description copied from interface: NestedThrowable (src)
Return the nested throwable.

Specified by:
getNested in interface NestedThrowable (src)
Returns:
Nested throwable.

getCause

public java.lang.Throwable getCause()
Description copied from interface: NestedThrowable (src)
Return the nested Throwable.

For JDK 1.4 compatibility.

Specified by:
getCause in interface NestedThrowable (src)

getMessage

public java.lang.String getMessage()

printStackTrace

public void printStackTrace(java.io.PrintStream stream)

printStackTrace

public void printStackTrace(java.io.PrintWriter writer)

printStackTrace

public void printStackTrace()