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

📄 fileloggingexceptionhandler.java

📁 java下面的异常框架
💻 JAVA
字号:
package org.expframework.exceptionhandler;

import org.expframework.data.ExceptionDTO;

/**
 * This class is used for logging the exceptions in a file using a logger as
 * well as getting the error code against a checked application exception.
 * 
 * @author ShriKant
 * 
 * @version 1.0
 */
public class FileLoggingExceptionHandler implements IExceptionHandler {

	/**
	 * No argument constructor
	 */
	public FileLoggingExceptionHandler() {
	}

	/**
	 * @see org.expframework.exceptionhandler.IExceptionHandler#handleException(java.lang.String,java.lang.String,
	 *      java.lang.Throwable)
	 */
	public ExceptionDTO handleException(String context, String userId,
			Throwable exp) {
		ExceptionDTO exDTO = ExceptionUtil.getExceptionDetails(context, exp);
		ExceptionUtil.logException(this.getClass(), exp, userId, exDTO
				.getLoggingType());
		return exDTO;
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -