KickJava   Java API By Example, From Geeks To Geeks.

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


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 validate operation.
11  *
12  * <p>
13  * The <tt>ValidationEventHandler</tt> can cause this exception to be thrown
14  * during the validate 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 Validator
22  * @since JAXB1.0
23  */

24 public class ValidationException extends JAXBException {
25
26     /**
27      * Construct an ValidationException 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 ValidationException(String JavaDoc message) {
33         this( message, null, null );
34     }
35
36     /**
37      * Construct an ValidationException 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 ValidationException(String JavaDoc message, String JavaDoc errorCode) {
44         this( message, errorCode, null );
45     }
46
47     /**
48      * Construct an ValidationException 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 ValidationException(Throwable JavaDoc exception) {
54         this( null, null, exception );
55     }
56
57     /**
58      * Construct an ValidationException 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 ValidationException(String JavaDoc message, Throwable JavaDoc exception) {
65         this( message, null, exception );
66     }
67
68     /**
69      * Construct an ValidationException 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 ValidationException(String JavaDoc message, String JavaDoc errorCode, Throwable JavaDoc exception) {
77         super( message, errorCode, exception );
78     }
79
80 }
81
Popular Tags