JMSException (Java EE 5)

Java EE API


javax.jms Class JMSException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by javax.jms.JMSException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
IllegalStateException, InvalidClientIDException, InvalidDestinationException, InvalidSelectorException, JMSSecurityException, MessageEOFException, MessageFormatException, MessageNotReadableException, MessageNotWriteableException, ResourceAllocationException, TransactionInProgressException, TransactionRolledBackException

public class JMSException
extends Exception

Extends: Throwable > Exception

这是所有 JMS API 异常的根类。

它提供以下信息:

  • 描述错误的特定于提供者的字符串。此字符串是标准异常消息,可通过 getMessage 方法获得。
  • 特定于提供者的字符串错误代码
  • 对其他异常的引用。通常,JMS API 异常是某个低级问题导致的。如果合适的话,此低级异常可以链接到 JMS API 异常。
英文文档:

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, Rich Burridge
See Also:
Serialized Form

Constructor Summary
 
Method Summary
 String
 Exception
 void
 
Methods inherited from class java.lang.Throwable
 
Methods inherited from class java.lang.Object
 

Constructor Detail

public JMSException(String reason, String errorCode)
构造带指定原因和错误代码的 JMSException
reason 对异常的描述
errorCode 指定特定于供应商的错误代码的字符串
英文文档:

JMSException

public JMSException(String reason,
                    String errorCode)
Constructs a JMSException with the specified reason and error code.

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


public JMSException(String reason)
构造带指定原因和默认为 null 的错误代码的 JMSException
reason 对异常的描述
英文文档:

JMSException

public JMSException(String reason)
Constructs a JMSException with the specified reason and with the error code defaulting to null.

Parameters:
reason - a description of the exception

Method Detail

public String getErrorCode()
获取特定于供应商的错误代码。
return 指定特定于供应商的错误代码的字符串
英文文档:

getErrorCode

public String getErrorCode()
Gets the vendor-specific error code.

Returns:
a string specifying the vendor-specific error code

public Exception getLinkedException()
获取与此异常链接的异常。
return 链接的 Exception;如果不存在,则返回 null
英文文档:

getLinkedException

public Exception getLinkedException()
Gets the exception linked to this one.

Returns:
the linked Exception, null if none

public void setLinkedException(Exception ex)
添加链接的 Exception
ex 链接的 Exception
英文文档:

setLinkedException

public void setLinkedException(Exception ex)
Adds a linked Exception.

Parameters:
ex - the linked Exception


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!