58 private Throwable cause; |
58 private Throwable cause; |
59 |
59 |
60 private URIReference uriReference; |
60 private URIReference uriReference; |
61 |
61 |
62 /** |
62 /** |
63 * Constructs a new <code>URIReferenceException</code> with |
63 * Constructs a new {@code URIReferenceException} with |
64 * <code>null</code> as its detail message. |
64 * {@code null} as its detail message. |
65 */ |
65 */ |
66 public URIReferenceException() { |
66 public URIReferenceException() { |
67 super(); |
67 super(); |
68 } |
68 } |
69 |
69 |
70 /** |
70 /** |
71 * Constructs a new <code>URIReferenceException</code> with the specified |
71 * Constructs a new {@code URIReferenceException} with the specified |
72 * detail message. |
72 * detail message. |
73 * |
73 * |
74 * @param message the detail message |
74 * @param message the detail message |
75 */ |
75 */ |
76 public URIReferenceException(String message) { |
76 public URIReferenceException(String message) { |
77 super(message); |
77 super(message); |
78 } |
78 } |
79 |
79 |
80 /** |
80 /** |
81 * Constructs a new <code>URIReferenceException</code> with the |
81 * Constructs a new {@code URIReferenceException} with the |
82 * specified detail message and cause. |
82 * specified detail message and cause. |
83 * <p>Note that the detail message associated with |
83 * <p>Note that the detail message associated with |
84 * <code>cause</code> is <i>not</i> automatically incorporated in |
84 * {@code cause} is <i>not</i> automatically incorporated in |
85 * this exception's detail message. |
85 * this exception's detail message. |
86 * |
86 * |
87 * @param message the detail message |
87 * @param message the detail message |
88 * @param cause the cause (A <tt>null</tt> value is permitted, and |
88 * @param cause the cause (A {@code null} value is permitted, and |
89 * indicates that the cause is nonexistent or unknown.) |
89 * indicates that the cause is nonexistent or unknown.) |
90 */ |
90 */ |
91 public URIReferenceException(String message, Throwable cause) { |
91 public URIReferenceException(String message, Throwable cause) { |
92 super(message); |
92 super(message); |
93 this.cause = cause; |
93 this.cause = cause; |
94 } |
94 } |
95 |
95 |
96 /** |
96 /** |
97 * Constructs a new <code>URIReferenceException</code> with the |
97 * Constructs a new {@code URIReferenceException} with the |
98 * specified detail message, cause and <code>URIReference</code>. |
98 * specified detail message, cause and {@code URIReference}. |
99 * <p>Note that the detail message associated with |
99 * <p>Note that the detail message associated with |
100 * <code>cause</code> is <i>not</i> automatically incorporated in |
100 * {@code cause} is <i>not</i> automatically incorporated in |
101 * this exception's detail message. |
101 * this exception's detail message. |
102 * |
102 * |
103 * @param message the detail message |
103 * @param message the detail message |
104 * @param cause the cause (A <tt>null</tt> value is permitted, and |
104 * @param cause the cause (A {@code null} value is permitted, and |
105 * indicates that the cause is nonexistent or unknown.) |
105 * indicates that the cause is nonexistent or unknown.) |
106 * @param uriReference the <code>URIReference</code> that was being |
106 * @param uriReference the {@code URIReference} that was being |
107 * dereferenced when the error was encountered |
107 * dereferenced when the error was encountered |
108 * @throws NullPointerException if <code>uriReference</code> is |
108 * @throws NullPointerException if {@code uriReference} is |
109 * <code>null</code> |
109 * {@code null} |
110 */ |
110 */ |
111 public URIReferenceException(String message, Throwable cause, |
111 public URIReferenceException(String message, Throwable cause, |
112 URIReference uriReference) { |
112 URIReference uriReference) { |
113 this(message, cause); |
113 this(message, cause); |
114 if (uriReference == null) { |
114 if (uriReference == null) { |
116 } |
116 } |
117 this.uriReference = uriReference; |
117 this.uriReference = uriReference; |
118 } |
118 } |
119 |
119 |
120 /** |
120 /** |
121 * Constructs a new <code>URIReferenceException</code> with the specified |
121 * Constructs a new {@code URIReferenceException} with the specified |
122 * cause and a detail message of <code>(cause==null ? null : |
122 * cause and a detail message of {@code (cause==null ? null : |
123 * cause.toString())</code> (which typically contains the class and detail |
123 * cause.toString())} (which typically contains the class and detail |
124 * message of <code>cause</code>). |
124 * message of {@code cause}). |
125 * |
125 * |
126 * @param cause the cause (A <tt>null</tt> value is permitted, and |
126 * @param cause the cause (A {@code null} value is permitted, and |
127 * indicates that the cause is nonexistent or unknown.) |
127 * indicates that the cause is nonexistent or unknown.) |
128 */ |
128 */ |
129 public URIReferenceException(Throwable cause) { |
129 public URIReferenceException(Throwable cause) { |
130 super(cause==null ? null : cause.toString()); |
130 super(cause==null ? null : cause.toString()); |
131 this.cause = cause; |
131 this.cause = cause; |
132 } |
132 } |
133 |
133 |
134 /** |
134 /** |
135 * Returns the <code>URIReference</code> that was being dereferenced |
135 * Returns the {@code URIReference} that was being dereferenced |
136 * when the exception was thrown. |
136 * when the exception was thrown. |
137 * |
137 * |
138 * @return the <code>URIReference</code> that was being dereferenced |
138 * @return the {@code URIReference} that was being dereferenced |
139 * when the exception was thrown, or <code>null</code> if not specified |
139 * when the exception was thrown, or {@code null} if not specified |
140 */ |
140 */ |
141 public URIReference getURIReference() { |
141 public URIReference getURIReference() { |
142 return uriReference; |
142 return uriReference; |
143 } |
143 } |
144 |
144 |
145 /** |
145 /** |
146 * Returns the cause of this <code>URIReferenceException</code> or |
146 * Returns the cause of this {@code URIReferenceException} or |
147 * <code>null</code> if the cause is nonexistent or unknown. (The |
147 * {@code null} if the cause is nonexistent or unknown. (The |
148 * cause is the throwable that caused this |
148 * cause is the throwable that caused this |
149 * <code>URIReferenceException</code> to get thrown.) |
149 * {@code URIReferenceException} to get thrown.) |
150 * |
150 * |
151 * @return the cause of this <code>URIReferenceException</code> or |
151 * @return the cause of this {@code URIReferenceException} or |
152 * <code>null</code> if the cause is nonexistent or unknown. |
152 * {@code null} if the cause is nonexistent or unknown. |
153 */ |
153 */ |
154 public Throwable getCause() { |
154 public Throwable getCause() { |
155 return cause; |
155 return cause; |
156 } |
156 } |
157 |
157 |
158 /** |
158 /** |
159 * Prints this <code>URIReferenceException</code>, its backtrace and |
159 * Prints this {@code URIReferenceException}, its backtrace and |
160 * the cause's backtrace to the standard error stream. |
160 * the cause's backtrace to the standard error stream. |
161 */ |
161 */ |
162 public void printStackTrace() { |
162 public void printStackTrace() { |
163 super.printStackTrace(); |
163 super.printStackTrace(); |
164 //XXX print backtrace of cause |
164 //XXX print backtrace of cause |
165 } |
165 } |
166 |
166 |
167 /** |
167 /** |
168 * Prints this <code>URIReferenceException</code>, its backtrace and |
168 * Prints this {@code URIReferenceException}, its backtrace and |
169 * the cause's backtrace to the specified print stream. |
169 * the cause's backtrace to the specified print stream. |
170 * |
170 * |
171 * @param s <code>PrintStream</code> to use for output |
171 * @param s {@code PrintStream} to use for output |
172 */ |
172 */ |
173 public void printStackTrace(PrintStream s) { |
173 public void printStackTrace(PrintStream s) { |
174 super.printStackTrace(s); |
174 super.printStackTrace(s); |
175 //XXX print backtrace of cause |
175 //XXX print backtrace of cause |
176 } |
176 } |
177 |
177 |
178 /** |
178 /** |
179 * Prints this <code>URIReferenceException</code>, its backtrace and |
179 * Prints this {@code URIReferenceException}, its backtrace and |
180 * the cause's backtrace to the specified print writer. |
180 * the cause's backtrace to the specified print writer. |
181 * |
181 * |
182 * @param s <code>PrintWriter</code> to use for output |
182 * @param s {@code PrintWriter} to use for output |
183 */ |
183 */ |
184 public void printStackTrace(PrintWriter s) { |
184 public void printStackTrace(PrintWriter s) { |
185 super.printStackTrace(s); |
185 super.printStackTrace(s); |
186 //XXX print backtrace of cause |
186 //XXX print backtrace of cause |
187 } |
187 } |