|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.jms Class MessageFormatException
java.lang.Object java.lang.Throwable java.lang.Exception javax.jms.JMSException javax.jms.MessageFormatException
- All Implemented Interfaces:
- Serializable
public class MessageFormatException
- extends JMSException
如果 JMS 客户端尝试使用消息不支持的数据类型,或者尝试以错误类型读取消息中的数据,则必须抛出此异常。当消息属性值发生同等类型的错误时,也必须抛出此异常。例如,如果给定的 StreamMessage.writeObject
是不受支持的类,或者 StreamMessage.readShort
用于读取 boolean
值,则必须抛出此异常。注意一种特殊情况,即尝试以数值形式读取未正确格式化的 String
数据导致的失败必须抛出 java.lang.NumberFormatException
。
version |
|
This exception must be thrown when a JMS client
attempts to use a data type not supported by a message or attempts to
read data in a message as the wrong type. It must also be thrown when
equivalent type errors are made with message property values. For
example, this exception must be thrown if
StreamMessage.writeObject
is given an unsupported class or
if StreamMessage.readShort
is used to read a
boolean
value. Note that the special case of a failure
caused by an attempt to read improperly formatted String
data as numeric values must throw the
java.lang.NumberFormatException
.
- Version:
- 26 August 1998
- Author:
- Rahul Sharma
- See Also:
- Serialized Form
Constructor Summary | |
---|---|
MessageFormatException(String reason)
Constructs a MessageFormatException with the specified
reason. |
|
MessageFormatException(String reason,
String errorCode)
Constructs a MessageFormatException with the specified
reason and error code. |
Method Summary |
---|
Methods inherited from class javax.jms.JMSException |
---|
getErrorCode, getLinkedException, setLinkedException |
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
MessageFormatException(String reason, String errorCode)
构造带指定原因和错误代码的 MessageFormatException
。
reason | 对异常的描述 |
errorCode | 指定特定于供应商的错误代码的字符串 |
MessageFormatException
public MessageFormatException(String reason, String errorCode)
- Constructs a
MessageFormatException
with the specified reason and error code.- Parameters:
reason
- a description of the exceptionerrorCode
- a string specifying the vendor-specific error code
public
MessageFormatException(String reason)
构造带指定原因的 MessageFormatException
。错误代码默认为 null。
reason | 对异常的描述 |
MessageFormatException
public MessageFormatException(String reason)
- Constructs a
MessageFormatException
with the specified reason. The error code defaults to null.- Parameters:
reason
- a description of the exception
|
|||||||||
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 : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!