org.jboss.mq
Class SpyJMSException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.jms.JMSException
              extended by org.jboss.mq.SpyJMSException
All Implemented Interfaces:
Serializable, org.jboss.util.NestedThrowable
Direct Known Subclasses:
DestinationFullException

public class SpyJMSException
extends javax.jms.JMSException
implements org.jboss.util.NestedThrowable

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

Version:
$Revision: 1.7.6.2 $
Author:
Jason Dillon, Adrian Brock
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.util.NestedThrowable
org.jboss.util.NestedThrowable.Util
 
Field Summary
protected  Throwable nested
          The nested throwable
 
Fields inherited from interface org.jboss.util.NestedThrowable
DETECT_DUPLICATE_NESTING, NESTED_TRACE_ENABLED, PARENT_TRACE_ENABLED
 
Constructor Summary
SpyJMSException(String msg)
          Construct a SpyJMSException with the specified detail message.
SpyJMSException(String msg, String code)
          Construct a SpyJMSException with the specified detail message and error code.
SpyJMSException(String msg, Throwable nested)
          Construct a SpyJMSException with the specified detail message and nested Throwable.
SpyJMSException(Throwable nested)
          Construct a SpyJMSException with the specified nested Throwable.
 
Method Summary
static javax.jms.JMSException getAsJMSException(String message, Throwable t)
          Converts a throwable to a JMSException if it is not already
 Throwable getCause()
           
 Exception getLinkedException()
           
 String getMessage()
           
 Throwable getNested()
           
 void printStackTrace()
           
 void printStackTrace(PrintStream stream)
           
 void printStackTrace(PrintWriter writer)
           
static void rethrowAsJMSException(String message, Throwable t)
          Converts a throwable to a JMSException if it is not already
 void setLinkedException(Exception e)
           
 
Methods inherited from class javax.jms.JMSException
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 Throwable nested
The nested throwable

Constructor Detail

SpyJMSException

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

Parameters:
msg - Detail message.

SpyJMSException

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

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

SpyJMSException

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

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

SpyJMSException

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

Parameters:
nested - Nested Throwable.
Method Detail

rethrowAsJMSException

public static void rethrowAsJMSException(String message,
                                         Throwable t)
                                  throws javax.jms.JMSException
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:
javax.jms.JMSException - always

getAsJMSException

public static javax.jms.JMSException getAsJMSException(String message,
                                                       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(Exception e)
Overrides:
setLinkedException in class javax.jms.JMSException

getLinkedException

public Exception getLinkedException()
Overrides:
getLinkedException in class javax.jms.JMSException

getNested

public Throwable getNested()
Specified by:
getNested in interface org.jboss.util.NestedThrowable

getCause

public Throwable getCause()
Specified by:
getCause in interface org.jboss.util.NestedThrowable
Overrides:
getCause in class Throwable

getMessage

public String getMessage()
Overrides:
getMessage in class Throwable

printStackTrace

public void printStackTrace(PrintStream stream)
Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace(PrintWriter writer)
Overrides:
printStackTrace in class Throwable

printStackTrace

public void printStackTrace()
Overrides:
printStackTrace in class Throwable


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.