baseruntimeexception.java
来自「Jaoso新闻文章发布系统 0.9.1final 程序架构: Struts」· Java 代码 · 共 67 行
JAVA
67 行
/*
* Created on 2004-6-19
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package jaoso.framework.exception;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
/**
* @author Administrator
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class BaseRuntimeException extends RuntimeException {
/** DOCUMENT ME! */
private Log log = LogFactory.getLog(getClass());
/** DOCUMENT ME! */
private Throwable rootCause;
/**
* default constructor
*/
public BaseRuntimeException() {
super();
}
/**
* @param arg0
* message
*/
public BaseRuntimeException(final String arg0) {
//super(arg0);
this(arg0, null);
rootCause = this;
}
/**
* @param arg0
* throwable
*/
public BaseRuntimeException(final Throwable arg0) {
this("", arg0);
}
/**
* @param arg0
* message
* @param arg1
* throwable
*/
public BaseRuntimeException(final String arg0, final Throwable arg1) {
super(arg0, arg1);
if (arg1 instanceof BaseRuntimeException) {
rootCause = ((BaseRuntimeException) arg1).rootCause;
} else {
rootCause = arg1;
}
log.error(arg0, arg1);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?