01: /*
02: * @(#)MessageFormatException.java 1.7 02/04/09
03: *
04: * Copyright 1997-2002 Sun Microsystems, Inc. All Rights Reserved.
05: *
06: * SUN PROPRIETARY/CONFIDENTIAL.
07: * This software is the proprietary information of Sun Microsystems, Inc.
08: * Use is subject to license terms.
09: *
10: */
11:
12: package javax.jms;
13:
14: /**
15: * <P> This exception must be thrown when a JMS client
16: * attempts to use a data type not supported by a message or attempts to
17: * read data in a message as the wrong type. It must also be thrown when
18: * equivalent type errors are made with message property values. For
19: * example, this exception must be thrown if
20: * <CODE>StreamMessage.writeObject</CODE> is given an unsupported class or
21: * if <CODE>StreamMessage.readShort</CODE> is used to read a
22: * <CODE>boolean</CODE> value. Note that the special case of a failure
23: * caused by an attempt to read improperly formatted <CODE>String</CODE>
24: * data as numeric values must throw the
25: * <CODE>java.lang.NumberFormatException</CODE>.
26: *
27: * @version 26 August 1998
28: * @author Rahul Sharma
29: **/
30:
31: public class MessageFormatException extends JMSException {
32:
33: /** Constructs a <CODE>MessageFormatException</CODE> with the specified
34: * reason and error code.
35: *
36: * @param reason a description of the exception
37: * @param errorCode a string specifying the vendor-specific
38: * error code
39: *
40: **/
41: public MessageFormatException(String reason, String errorCode) {
42: super (reason, errorCode);
43: }
44:
45: /** Constructs a <CODE>MessageFormatException</CODE> with the specified
46: * reason. The error code defaults to null.
47: *
48: * @param reason a description of the exception
49: **/
50: public MessageFormatException(String reason) {
51: super(reason);
52: }
53:
54: }
|