⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 baseexception.java

📁 使用WEBWORK,SPRING,HIBERNATE编写的简单的添加
💻 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 + -