FileDocCategorySizeDatePackage
JMSException.javaAPI DocGlassfish v2 API4195Fri May 04 22:36:16 BST 2007javax.jms

JMSException

public class JMSException extends Exception

This is the root class of all JMS API exceptions.

It provides the following information:

  • A provider-specific string describing the error. This string is the standard exception message and is available via the getMessage method.
  • A provider-specific string error code
  • A reference to another exception. Often a JMS API exception will be the result of a lower-level problem. If appropriate, this lower-level exception can be linked to the JMS API exception.
version
1.0 - 5 Oct 1998
author
Mark Hapner
author
Rich Burridge

Fields Summary
private String
errorCode
Vendor-specific error code.
private Exception
linkedException
Exception reference.
Constructors Summary
public JMSException(String reason, String errorCode)
Constructs a JMSException with the specified reason and error code.

param
reason a description of the exception
param
errorCode a string specifying the vendor-specific error code

    super(reason);
    this.errorCode = errorCode;
    linkedException = null;
  
public JMSException(String reason)
Constructs a JMSException with the specified reason and with the error code defaulting to null.

param
reason a description of the exception

    super(reason);
    this.errorCode = null;
    linkedException = null;
  
Methods Summary
public java.lang.StringgetErrorCode()
Gets the vendor-specific error code.

return
a string specifying the vendor-specific error code

    return this.errorCode;
  
public java.lang.ExceptiongetLinkedException()
Gets the exception linked to this one.

return
the linked Exception, null if none

    return (linkedException);
  
public synchronized voidsetLinkedException(java.lang.Exception ex)
Adds a linked Exception.

param
ex the linked Exception

      linkedException = ex;