📄 baseexception.java
字号:
/**
*文件功能: 系统异常基类
*/
package com.common.exception;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* @作者 徐建协
* @日期 2008-1-12
*/
public class BaseException extends Exception{
private Log log=LogFactory.getLog(getClass());
private Throwable rootCause;
/**
* @param args
*/
public BaseException() {
super();
}
public BaseException(String s) {
super(s);
}
public BaseException(String s, Throwable e) {
super(s);
if (e instanceof BaseException) {
rootCause = ((BaseException) e).rootCause;
} else {
rootCause = e;
}
log.info(s, e);
}
public BaseException(Throwable e) {
this("", e);
}
public Throwable getRootCause() {
return rootCause;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -