|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| package org.jconfig.error; |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| public class MockErrorHandler implements ErrorHandler { |
|
12 |
| |
|
13 |
| private String msg; |
|
14 |
| private Throwable thrown; |
|
15 |
| |
|
16 |
0
| public MockErrorHandler() {
|
|
17 |
| |
|
18 |
| } |
|
19 |
| |
|
20 |
| |
|
21 |
| |
|
22 |
0
| public void reportError(String message) {
|
|
23 |
0
| reportError(message,null);
|
|
24 |
| } |
|
25 |
| |
|
26 |
| |
|
27 |
| |
|
28 |
| |
|
29 |
0
| public void reportError(String message, Throwable thrown) {
|
|
30 |
0
| msg = message;
|
|
31 |
0
| this.thrown = thrown;
|
|
32 |
| |
|
33 |
| } |
|
34 |
| |
|
35 |
0
| public void reset() {
|
|
36 |
0
| msg = null;
|
|
37 |
0
| thrown = null;
|
|
38 |
| } |
|
39 |
| |
|
40 |
| |
|
41 |
| |
|
42 |
0
| public String getMsg() {
|
|
43 |
0
| return msg;
|
|
44 |
| } |
|
45 |
| |
|
46 |
| |
|
47 |
| |
|
48 |
0
| public Throwable getThrown() {
|
|
49 |
0
| return thrown;
|
|
50 |
| } |
|
51 |
| } |