From b9ad9a4826740690a19d03b943cc02788c6f0411 Mon Sep 17 00:00:00 2001
From: Simon Ehrenstein <simon.ehrenstein@gmail.com>
Date: Sun, 14 Jun 2020 18:20:56 +0200
Subject: [PATCH] Wrap workload generation termination in IllegalStateException

---
 .../generators/AbstractWorkloadGenerator.java                 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/workload-generator-commons/src/main/java/theodolite/commons/workloadgeneration/generators/AbstractWorkloadGenerator.java b/workload-generator-commons/src/main/java/theodolite/commons/workloadgeneration/generators/AbstractWorkloadGenerator.java
index f7ec7c417..17aa9871d 100644
--- a/workload-generator-commons/src/main/java/theodolite/commons/workloadgeneration/generators/AbstractWorkloadGenerator.java
+++ b/workload-generator-commons/src/main/java/theodolite/commons/workloadgeneration/generators/AbstractWorkloadGenerator.java
@@ -117,8 +117,8 @@ public abstract class AbstractWorkloadGenerator<T extends IMonitoringRecord>
         LOGGER.info("Terminating now...");
         this.stop();
       } catch (final InterruptedException e) {
-        // TODO Auto-generated catch block
-        e.printStackTrace();
+        LOGGER.error("", e);
+        throw new IllegalStateException("Error when terminating the workload generation.");
       }
     };
 
-- 
GitLab