Skip to content
Snippets Groups Projects
Commit bddf4b48 authored by Nelson Tavares de Sousa's avatar Nelson Tavares de Sousa
Browse files

added mechanism, which kills the whole analysis execution

parent c1eaff5f
No related branches found
No related tags found
No related merge requests found
...@@ -23,7 +23,7 @@ abstract class RunnableStage implements Runnable { ...@@ -23,7 +23,7 @@ abstract class RunnableStage implements Runnable {
@Override @Override
public final void run() { public final void run() {
this.logger.debug("Executing runnable stage..."); this.logger.debug("Executing runnable stage...");
boolean failed = false;
try { try {
beforeStageExecution(); beforeStageExecution();
...@@ -33,6 +33,7 @@ abstract class RunnableStage implements Runnable { ...@@ -33,6 +33,7 @@ abstract class RunnableStage implements Runnable {
} catch (StageException e) { } catch (StageException e) {
if (this.listener.onStageException(e, e.getThrowingStage()) == FurtherExecution.TERMINATE) { if (this.listener.onStageException(e, e.getThrowingStage()) == FurtherExecution.TERMINATE) {
this.stage.terminate(); this.stage.terminate();
failed = true;
} }
} }
} while (!this.stage.shouldBeTerminated()); } while (!this.stage.shouldBeTerminated());
...@@ -48,6 +49,9 @@ abstract class RunnableStage implements Runnable { ...@@ -48,6 +49,9 @@ abstract class RunnableStage implements Runnable {
} }
this.logger.debug("Finished runnable stage. (" + this.stage.getId() + ")"); this.logger.debug("Finished runnable stage. (" + this.stage.getId() + ")");
if (failed) {
throw new IllegalStateException("Terminated by StageExceptionListener");
}
} }
protected abstract void beforeStageExecution(); protected abstract void beforeStageExecution();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment