KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > xml > bind > MarshalException


1 /*
2  * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
3  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
4  */

5
6 package javax.xml.bind;
7
8 /**
9  * This exception indicates that an error has occurred while performing
10  * a marshal operation that the provider is unable to recover from.
11  *
12  * <p>
13  * The <tt>ValidationEventHandler</tt> can cause this exception to be thrown
14  * during the marshal operations. See
15  * {@link ValidationEventHandler#handleEvent(ValidationEvent)
16  * ValidationEventHandler.handleEvent(ValidationEvent)}.
17  *
18  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li></ul>
19  * @version $Revision: 1.2 $
20  * @see JAXBException
21  * @see Marshaller
22  * @since JAXB1.0
23  */

24 public class MarshalException extends JAXBException {
25
26     /**
27      * Construct a MarshalException with the specified detail message. The
28      * errorCode and linkedException will default to null.
29      *
30      * @param message a description of the exception
31      */

32     public MarshalException( String JavaDoc message ) {
33         this( message, null, null );
34     }
35
36     /**
37      * Construct a MarshalException with the specified detail message and vendor
38      * specific errorCode. The linkedException will default to null.
39      *
40      * @param message a description of the exception
41      * @param errorCode a string specifying the vendor specific error code
42      */

43     public MarshalException( String JavaDoc message, String JavaDoc errorCode ) {
44         this( message, errorCode, null );
45     }
46
47     /**
48      * Construct a MarshalException with a linkedException. The detail message and
49      * vendor specific errorCode will default to null.
50      *
51      * @param exception the linked exception
52      */

53     public MarshalException( Throwable JavaDoc exception ) {
54         this( null, null, exception );
55     }
56     
57     /**
58      * Construct a MarshalException with the specified detail message and
59      * linkedException. The errorCode will default to null.
60      *
61      * @param message a description of the exception
62      * @param exception the linked exception
63      */

64     public MarshalException( String JavaDoc message, Throwable JavaDoc exception ) {
65         this( message, null, exception );
66     }
67     
68     /**
69      * Construct a MarshalException with the specified detail message, vendor
70      * specific errorCode, and linkedException.
71      *
72      * @param message a description of the exception
73      * @param errorCode a string specifying the vendor specific error code
74      * @param exception the linked exception
75      */

76     public MarshalException( String JavaDoc message, String JavaDoc errorCode, Throwable JavaDoc exception ) {
77         super( message, errorCode, exception );
78     }
79
80 }
81
82
83
Popular Tags