|
|||||||||||||||||||
This license of Clover is provided to support the development of JBind only. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover. | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
UnexpectedException.java | - | 0% | 0% | 0% |
|
1 |
/* |
|
2 |
* JBind |
|
3 |
* |
|
4 |
* Copyright (c) by Stefan Wachter. All rights reserved. |
|
5 |
* |
|
6 |
* Usage, modification, and redistribution is subject to license terms that are |
|
7 |
* available at 'http://www.jbind.org'. The JBind license is like the |
|
8 |
* 'Apache Software License V 1.1'. |
|
9 |
*/ |
|
10 |
package org.jbind.base; |
|
11 |
|
|
12 |
/** |
|
13 |
* Runtime exception that wraps (checked) exceptions that were raised unexpectedly. |
|
14 |
* |
|
15 |
* This class is derived from RuntimeException in order not to clutter the code |
|
16 |
* with unexpected exceptions. |
|
17 |
*/ |
|
18 |
public class UnexpectedException extends RuntimeException { |
|
19 |
|
|
20 |
private Exception myException = null; |
|
21 |
|
|
22 |
/** |
|
23 |
* Constructs an UnexpectedException. |
|
24 |
* |
|
25 |
* @param anException <i>(required)</i>. The (checked) exception that was |
|
26 |
* raised unexpectedly. |
|
27 |
*/ |
|
28 | 0 |
public UnexpectedException(Exception anException) { |
29 | 0 |
super(anException); |
30 | 0 |
myException = anException; |
31 |
} |
|
32 |
|
|
33 |
/** |
|
34 |
* Gets the wrapped exception. |
|
35 |
* |
|
36 |
* @return <i>(required)</i>. |
|
37 |
*/ |
|
38 | 0 |
public Exception getException() { |
39 | 0 |
return myException; |
40 |
} |
|
41 |
|
|
42 |
} |
|
43 |
|
|