|
1 |
| package com.agical.rdoc.core.parser; |
|
2 |
| |
|
3 |
| import java.io.PrintStream; |
|
4 |
| import java.io.PrintWriter; |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| public class RuntimeException extends java.lang.RuntimeException { |
|
13 |
| private static final long serialVersionUID = -5644018798112984262L; |
|
14 |
| |
|
15 |
| private Throwable cause; |
|
16 |
| |
|
17 |
1
| public RuntimeException(Throwable cause) {
|
|
18 |
1
| super();
|
|
19 |
1
| this.cause = cause;
|
|
20 |
| } |
|
21 |
| |
|
22 |
0
| public void printStackTrace() {
|
|
23 |
0
| printStackTrace( System.err );
|
|
24 |
| } |
|
25 |
| |
|
26 |
0
| public void printStackTrace( PrintStream printStream) {
|
|
27 |
0
| PrintWriter printWriter = null;
|
|
28 |
0
| try {
|
|
29 |
0
| printWriter = new PrintWriter(printStream);
|
|
30 |
0
| printStackTrace(printWriter);
|
|
31 |
| } finally { |
|
32 |
0
| if( printWriter != null ) {
|
|
33 |
0
| printWriter.close();
|
|
34 |
| } |
|
35 |
| } |
|
36 |
| } |
|
37 |
| |
|
38 |
1
| public void printStackTrace(PrintWriter printWriter) {
|
|
39 |
1
| super.printStackTrace( printWriter);
|
|
40 |
1
| printWriter.println("Cause:");
|
|
41 |
1
| cause.printStackTrace( printWriter );
|
|
42 |
| } |
|
43 |
| } |