All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jdroid.javaweb.exception.DefaultExceptionHandler Maven / Gradle / Ivy

The newest version!
package com.jdroid.javaweb.exception;

import com.jdroid.java.utils.LoggerUtils;

import org.slf4j.Logger;

import java.lang.Thread.UncaughtExceptionHandler;

public class DefaultExceptionHandler implements UncaughtExceptionHandler {
	
	private final static Logger LOGGER = LoggerUtils.getLogger(DefaultExceptionHandler.class);
	
	private UncaughtExceptionHandler wrappedExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();

	@Override
	public void uncaughtException(Thread thread, Throwable throwable) {
		LOGGER.error("Uncaught Exception", throwable);
		wrappedExceptionHandler.uncaughtException(thread, throwable);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy