【Java开源代码栏目提醒】:网学会员Java开源代码为您提供BaseRuntimeException.java参考,解决您在BaseRuntimeException.java学习中工作中的难题,参考学习。
/*
* 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 {
//~ Instance fields ========================================================
/** DOCUMENT ME! */
private Log log = LogFactory.getLog(getClass());
/** DOCUMENT ME! */
private Throwable rootCause;
//~ Constructors ===========================================================
/**
* 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);
}
}
上一篇:
BaseRMS.java
下一篇:
还记得,那年的风车吗?