01: /*
02: * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
03: * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
04: */
05:
06: package javax.xml.bind;
07:
08: /**
09: * This exception indicates that an error has occurred while performing
10: * an unmarshal operation that prevents the JAXB Provider from completing
11: * the operation.
12: *
13: * <p>
14: * The <tt>ValidationEventHandler</tt> can cause this exception to be thrown
15: * during the unmarshal operations. See
16: * {@link ValidationEventHandler#handleEvent(ValidationEvent)
17: * ValidationEventHandler.handleEvent(ValidationEvent)}.
18: *
19: * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
20: * @version $Revision: 1.1 $
21: * @see JAXBException
22: * @see Unmarshaller
23: * @see ValidationEventHandler
24: * @since JAXB1.0
25: */
26: public class UnmarshalException extends JAXBException {
27:
28: /**
29: * Construct an UnmarshalException with the specified detail message. The
30: * errorCode and linkedException will default to null.
31: *
32: * @param message a description of the exception
33: */
34: public UnmarshalException(String message) {
35: this (message, null, null);
36: }
37:
38: /**
39: * Construct an UnmarshalException with the specified detail message and vendor
40: * specific errorCode. The linkedException will default to null.
41: *
42: * @param message a description of the exception
43: * @param errorCode a string specifying the vendor specific error code
44: */
45: public UnmarshalException(String message, String errorCode) {
46: this (message, errorCode, null);
47: }
48:
49: /**
50: * Construct an UnmarshalException with a linkedException. The detail message and
51: * vendor specific errorCode will default to null.
52: *
53: * @param exception the linked exception
54: */
55: public UnmarshalException(Throwable exception) {
56: this (null, null, exception);
57: }
58:
59: /**
60: * Construct an UnmarshalException with the specified detail message and
61: * linkedException. The errorCode will default to null.
62: *
63: * @param message a description of the exception
64: * @param exception the linked exception
65: */
66: public UnmarshalException(String message, Throwable exception) {
67: this (message, null, exception);
68: }
69:
70: /**
71: * Construct an UnmarshalException with the specified detail message, vendor
72: * specific errorCode, and linkedException.
73: *
74: * @param message a description of the exception
75: * @param errorCode a string specifying the vendor specific error code
76: * @param exception the linked exception
77: */
78: public UnmarshalException(String message, String errorCode,
79: Throwable exception) {
80: super(message, errorCode, exception);
81: }
82:
83: }
|