|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.jms Class JMSException
java.lang.Object java.lang.Throwable java.lang.Exception 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
Extended by:
IllegalStateException, InvalidClientIDException, InvalidDestinationException, InvalidSelectorException, JMSSecurityException, MessageEOFException, MessageFormatException, MessageNotReadableException, MessageNotWriteableException, ResourceAllocationException, TransactionInProgressException, TransactionRolledBackException
这是所有 JMS API 异常的根类。
它提供以下信息:
- 描述错误的特定于提供者的字符串。此字符串是标准异常消息,可通过
getMessage
方法获得。 - 特定于提供者的字符串错误代码
- 对其他异常的引用。通常,JMS API 异常是某个低级问题导致的。如果合适的话,此低级异常可以链接到 JMS API 异常。
version |
|
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 | |
---|---|
JMSException(String reason)
Constructs a JMSException with the specified reason and with
the error code defaulting to null. |
|
JMSException(String reason,
String errorCode)
Constructs a JMSException with the specified reason and
error code. |
Method Summary | |
---|---|
String |
getErrorCode()
Gets the vendor-specific error code. |
Exception |
getLinkedException()
Gets the exception linked to this one. |
void |
setLinkedException(Exception ex)
Adds a linked Exception . |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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 exceptionerrorCode
- 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 linkedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!