1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package inc.che.common.assertion;
20
21
22
23 import org.apache.log4j.Logger;
24
25 /***
26 * <b>Errorklasse für Assert</b>
27 * @version $Id: AssertionException.java,v 1.1 2005/03/06 12:56:47 stevemcmee Exp $
28 * @author <address> Steve McMee <stevemcmee@users.sourceforge.net></address>
29 */
30
31 public class AssertionException extends RuntimeException {
32
33 /*** CVS ID of this file */
34 public static final String CVS_ID =
35 "$Id: AssertionException.java,v 1.1 2005/03/06 12:56:47 stevemcmee Exp $";
36
37 /***
38 * logger instance for this class
39 */
40
41 private static Logger log = Logger.getLogger(AssertionException.class);
42
43 private Throwable cause;
44 public AssertionException() {
45 if (log.isDebugEnabled()) {
46 log.debug("AssertionException()");
47 }
48 }
49 public AssertionException(String msg) {
50 super(msg);
51 if (log.isDebugEnabled()) {
52 log.debug("AssertionException(" + msg + ")");
53 }
54 }
55 public AssertionException(Throwable t) {
56 if (log.isDebugEnabled()) {
57 log.debug("AssertionException(" + t + ")");
58 }
59 cause = t;
60 }
61 public AssertionException(String msg, Throwable t) {
62 super(msg);
63 if (log.isDebugEnabled()) {
64 log.debug("AssertionException(" + msg + "," + t + ")");
65 }
66 cause = t;
67 }
68
69 public Throwable getCause() {
70 return cause;
71 }
72 }