/* * JBoss, the OpenSource EJB server * * Distributable under LGPL license. * See terms of license at gnu.org. */ package javax.jms; /** * This is the root class of all JMS exceptions. * *

It provides following information: *

* * @author Chris Kimpton (chris@kimptoc.net) * @author Jason Dillon * @version $Revision: 1.3 $ **/ public class JMSException extends Exception { /** The specified error code */ private String errorCode; // = null; /** A linked exception */ private Exception linkedException; /** * Construct a JMSException with reason and error code for exception */ public JMSException(String reason, String errorCode) { super(reason); this.errorCode = errorCode; } /** * Construct a JMSException with reason and with error code defaulting * to null. */ public JMSException(String reason) { this(reason, null); } /** * Get the vendor specific error code. */ public String getErrorCode() { return errorCode; } /** * Get the exception linked to this one. */ public Exception getLinkedException() { return linkedException; } /** * Set the linked exception */ public synchronized void setLinkedException(Exception ex) { linkedException = ex; } }