package eu.dnetlib.parthenos;

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 ParthenosAsyncUncaughtExceptionHandler implements AsyncUncaughtExceptionHandler {

	private static final Log log = LogFactory.getLog(ParthenosAsyncUncaughtExceptionHandler.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);
	}
}
