📄 chainedruntimeexception.java
字号:
package org.jbpm.util.lang;
import java.io.*;
public class ChainedRuntimeException extends RuntimeException {
private Throwable cause = null;
public ChainedRuntimeException() {
super();
}
public ChainedRuntimeException(String msg) {
super(msg);
}
public ChainedRuntimeException(Throwable cause) {
super(cause.getMessage());
this.cause = cause;
}
public ChainedRuntimeException(String msg, Throwable cause) {
super(msg);
this.cause = cause;
}
public Throwable getCause() {
return cause;
}
public void printStackTrace() {
super.printStackTrace();
if (cause != null) {
System.err.println("caused by: " + cause);
}
}
public void printStackTrace(PrintStream s) {
super.printStackTrace(s);
if (cause != null) {
s.println("caused by: ");
cause.printStackTrace(s);
}
}
public void printStackTrace(PrintWriter s) {
super.printStackTrace(s);
if (cause != null) {
s.println("caused by: ");
cause.printStackTrace(s);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -