1
17 package gate.util;
18
19
22 public class GateRuntimeException extends RuntimeException {
23
24 public GateRuntimeException() {
25 }
26
27 public GateRuntimeException(String message) {
28 super(message);
29 }
30
31 public GateRuntimeException(String message, Throwable cause) {
32 super(message);
33 this.throwable = cause;
34 }
35
36 public GateRuntimeException(Throwable e) {
37 this.throwable = e;
38 }
39
40
43 public void printStackTrace(){
44 printStackTrace(System.err);
45 }
46
47
50 public void printStackTrace(java.io.PrintStream s) {
51 s.flush();
52 super.printStackTrace(s);
53 s.print(" Caused by:\n");
54 if(throwable != null) throwable.printStackTrace(s);
55 }
56
57
60 public void printStackTrace(java.io.PrintWriter s) {
61 s.flush();
62 super.printStackTrace(s);
63 s.print(" Caused by:\n");
64 if(throwable != null) throwable.printStackTrace(s);
65 }
66
67
68 Throwable throwable;
69 }