KickJava   Java API By Example, From Geeks To Geeks.

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


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
10 /**
11  * This exception indicates that an error was encountered while getting or
12  * setting a property.
13  *
14  * @author <ul><li>Ryan Shoemaker, Sun Microsystems, Inc.</li><li>Kohsuke Kawaguchi, Sun Microsystems, Inc.</li><li>Joe Fialli, Sun Microsystems, Inc.</li></ul>
15  * @version $Revision: 1.2 $ $Date: 2004/06/14 21:23:04 $
16  * @see JAXBContext
17  * @see Validator
18  * @see Unmarshaller
19  * @since JAXB1.0
20  */

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

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

40     public PropertyException(String JavaDoc message, String JavaDoc errorCode) {
41         super(message, errorCode);
42     }
43     
44     /**
45      * Construct a PropertyException with a linkedException. The detail
46      * message and vendor specific errorCode will default to null.
47      *
48      * @param exception the linked exception
49      */

50     public PropertyException(Throwable JavaDoc exception) {
51         super(exception);
52     }
53     
54     /**
55      * Construct a PropertyException with the specified detail message and
56      * linkedException. The errorCode will default to null.
57      *
58      * @param message a description of the exception
59      * @param exception the linked exception
60      */

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

73     public PropertyException(
74         String JavaDoc message,
75         String JavaDoc errorCode,
76         Throwable JavaDoc exception) {
77         super(message, errorCode, exception);
78     }
79     
80     /**
81      * Construct a PropertyException whose message field is set based on the
82      * name of the property and value.toString().
83      *
84      * @param name the name of the property related to this exception
85      * @param value the value of the property related to this exception
86      */

87     public PropertyException(String JavaDoc name, Object JavaDoc value) {
88         super( Messages.format( Messages.NAME_VALUE,
89                                         name,
90                                         value.toString() ) );
91     }
92     
93     
94 }
95
Popular Tags