AriadnePlus/dnet-ariadneplus-publisher/src/main/java/eu/dnetlib/ariadneplus/AriadnePlusAsyncUncaughtExc...

25 lines
728 B
Java

package eu.dnetlib.ariadneplus;
import java.lang.reflect.Method;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler;
/**
* Created by Alessia Bardi on 17/10/2017.
*
* @author Alessia Bardi
*/
public class AriadnePlusAsyncUncaughtExceptionHandler implements AsyncUncaughtExceptionHandler {
private static final Log log = LogFactory.getLog(AriadnePlusAsyncUncaughtExceptionHandler.class);
@Override
public void handleUncaughtException(final Throwable throwable, final Method method, final Object... objects) {
log.error("Method Name::"+method.getName());
log.error("Exception occurred::"+ throwable);
}
}