📄 baseexception.java
字号:
/*
* Created on 2003-10-15
*/
package jaoso.framework.exception;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* @author xiongj
*/
public class BaseException extends Exception {
//~ Instance fields ========================================================
/** DOCUMENT ME! */
private Log log = LogFactory.getLog(getClass());
/** DOCUMENT ME! */
private Throwable rootCause;
//~ Constructors ===========================================================
/**
*
*/
public BaseException() {
super();
}
/**
* @param s
*/
public BaseException(String s) {
this(s, null);
rootCause = this;
}
/**
* Creates a new BaseException object.
*
* @param s DOCUMENT ME!
* @param e DOCUMENT ME!
*/
public BaseException(String s, Throwable e) {
super(s);
if (e instanceof BaseException) {
rootCause = ((BaseException) e).rootCause;
} else {
rootCause = e;
}
log.info(s, e);
}
/**
* Creates a new BaseException object.
*
* @param e DOCUMENT ME!
*/
public BaseException(Throwable e) {
this("", e);
}
//~ Methods ================================================================
/**
* @return
*/
public Throwable getRootCause() {
return rootCause;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -