01: /*
02: * Created on 05.07.2004
03: * Created by crappy eclipse.
04: */
05: package org.jzonic.jlo.error;
06:
07: import java.util.List;
08: import java.util.Vector;
09:
10: /**
11: * @author Mecky
12: * shoot me because I am using eclipse
13: */
14: public class MockErrorReporter implements ErrorReporter {
15:
16: private List messages;
17:
18: public MockErrorReporter() {
19: messages = new Vector();
20: }
21:
22: /* (non-Javadoc)
23: * @see org.jzonic.jlo.error.ErrorReporter#reportError(java.lang.String)
24: */
25: public void reportError(String message) {
26: messages.add(message);
27: }
28:
29: /* (non-Javadoc)
30: * @see org.jzonic.jlo.error.ErrorReporter#reportError(java.lang.String, java.lang.Throwable)
31: */
32: public void reportError(String message, Throwable thrown) {
33: messages.add(message);
34: }
35:
36: /* (non-Javadoc)
37: * @see org.jzonic.jlo.error.ErrorReporter#reportError(java.lang.Throwable)
38: */
39: public void reportError(Throwable thrown) {
40: messages.add("exception:" + thrown.getMessage());
41: }
42:
43: public List getMessages() {
44: return messages;
45: }
46:
47: }
|