Skip to content

Commit

Permalink
Changed TaskManger to catch Exception [#528]
Browse files Browse the repository at this point in the history
Rather than a specific exception, changed TaskManager to catch any
exception thrown to avoid unexpected errors slipping through the
cracks.
  • Loading branch information
mcpierce committed Oct 19, 2020
1 parent 485ea81 commit e5ad155
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.comixedproject.service.task.TaskService;
import org.comixedproject.task.model.MonitorTaskQueueWorkerTask;
import org.comixedproject.task.model.WorkerTask;
import org.comixedproject.task.model.WorkerTaskException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
Expand Down Expand Up @@ -71,7 +70,7 @@ public void runTask(final WorkerTask workerTask, final Task persistedTask) {
workerTask.startTask();
if (!(workerTask instanceof MonitorTaskQueueWorkerTask))
this.updateAuditLog(true, started, description, null);
} catch (WorkerTaskException error) {
} catch (Exception error) {
log.error("Error executing task: {}" + description, description, error);
if (!(workerTask instanceof MonitorTaskQueueWorkerTask))
this.updateAuditLog(false, started, description, error);
Expand Down

0 comments on commit e5ad155

Please sign in to comment.