com.jdroid.javaweb.exception.DefaultExceptionHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdroid-java-webapp Show documentation
Show all versions of jdroid-java-webapp Show documentation
Jdroid library for Java Web apps
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);
}
}