@@ -0,0 +1,1137 @@
+package com.github.aureliano.evtbridge.core.exception;%0A%0Aimport java.util.List;%0A%0Aimport org.apache.log4j.Logger;%0A%0Aimport com.github.aureliano.evtbridge.core.command.DataIterationCommand;%0Aimport com.github.aureliano.evtbridge.core.config.IConfigInput;%0Aimport com.github.aureliano.evtbridge.core.helper.ExceptionHandlerHelper;%0A%0Apublic class ThreadExceptionHandler implements Thread.UncaughtExceptionHandler %7B%0A%0A%09private static final Logger logger = Logger.getLogger(ThreadExceptionHandler.class);%0A%09%0A%09private DataIterationCommand command;%0A%09%0A%09public ThreadExceptionHandler(DataIterationCommand command) %7B%0A%09%09this.command = command;%0A%09%7D%0A%09%0A%09@Override%0A%09public void uncaughtException(Thread thread, Throwable ex) %7B%0A%09%09IConfigInput inputConfig = (IConfigInput) this.command.getDataReader().getConfiguration();%0A%09%09List%3CIExceptionHandler%3E handlers = inputConfig.getExceptionHandlers();%0A%09%09%0A%09%09for (IExceptionHandler handler : handlers) %7B%0A%09%09%09handler.captureException(thread, inputConfig, ex);%0A%09%09%7D%0A%0A%09%09if (handlers.isEmpty()) %7B%0A%09%09%09logger.error(ex.getMessage(), ex);%0A%09%09%7D%0A%09%09ExceptionHandlerHelper.configureCommandLogExecutionForException(this.command, ex);%0A%09%7D%0A%7D

Create thread exception handler.