com.linkedin.r2.util.UncaughtExceptionHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of r2-core Show documentation
Show all versions of r2-core Show documentation
Pegasus is a framework for building robust, scalable service architectures using dynamic discovery and simple asychronous type-checked REST + JSON APIs.
The newest version!
/**
* $Id: $
*/
package com.linkedin.r2.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* UncaughtExceptionHandler
*
* This class can be set on a thread to log uncaught exceptions.
*
* @see Thread#setUncaughtExceptionHandler
*
* @author David Hoa
* @version $Revision: $
*/
public class UncaughtExceptionHandler implements Thread.UncaughtExceptionHandler
{
private static final Logger _log = LoggerFactory.getLogger(UncaughtExceptionHandler.class);
@Override
public void uncaughtException(Thread t, Throwable e)
{
_log.error("exception from thread: " + t, e);
throw new RuntimeException(e);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy