类 JmsException
- java.lang.Object
- java.lang.Throwable
- java.lang.Exception
- java.lang.RuntimeException
- org.springframework.core.NestedRuntimeException
- org.springframework.jms.JmsException
- 所有已实现的接口:
Serializable
- 直接已知子类:
DestinationResolutionException
,IllegalStateException
,InvalidClientIDException
,InvalidDestinationException
,InvalidSelectorException
,JmsSecurityException
,ListenerExecutionFailedException
,MessageConversionException
,MessageEOFException
,MessageFormatException
,MessageNotReadableException
,MessageNotWriteableException
,ReplyFailureException
,ResourceAllocationException
,SynchedLocalTransactionFailedException
,TransactionInProgressException
,TransactionRolledBackException
,UncategorizedJmsException
public abstract class JmsException extends NestedRuntimeException
Base class for exception thrown by the framework whenever it encounters a problem related to JMS.- 从以下版本开始:
- 1.1
- 作者:
- Mark Pollack, Juergen Hoeller
- 另请参阅:
- 序列化表格
构造器概要
构造器 构造器 说明 JmsException(String msg)
Constructor that takes a message.JmsException(String msg, Throwable cause)
Constructor that takes a message and a root cause.JmsException(Throwable cause)
Constructor that takes a plain root cause, intended for subclasses mirroring correspondingjavax.jms
exceptions.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 String
getErrorCode()
Convenience method to get the vendor specific error code if the root cause was an instance of JMSException.String
getMessage()
Return the detail message, including the message from the linked exception if there is one.从类继承的方法 org.springframework.core.NestedRuntimeException
contains, getMostSpecificCause, getRootCause
构造器详细资料
JmsException
public JmsException(String msg)
Constructor that takes a message.- 参数:
msg
- the detail message
JmsException
public JmsException(String msg, Throwable cause)
Constructor that takes a message and a root cause.- 参数:
msg
- the detail messagecause
- the cause of the exception. This argument is generally expected to be a proper subclass ofJMSException
, but can also be a JNDI NamingException or the like.
JmsException
public JmsException(Throwable cause)
Constructor that takes a plain root cause, intended for subclasses mirroring correspondingjavax.jms
exceptions.- 参数:
cause
- the cause of the exception. This argument is generally expected to be a proper subclass ofJMSException
.
方法详细资料
getErrorCode
public String getErrorCode()
Convenience method to get the vendor specific error code if the root cause was an instance of JMSException.- 返回:
- a string specifying the vendor-specific error code if the root cause is an instance of JMSException, or
null
getMessage
public String getMessage()
Return the detail message, including the message from the linked exception if there is one.