mattrpav commented on code in PR #2206:
URL: https://github.com/apache/activemq/pull/2206#discussion_r3624166165


##########
activemq-client/src/main/java/org/apache/activemq/thread/SchedulerTimerTask.java:
##########
@@ -29,19 +29,28 @@ public class SchedulerTimerTask extends TimerTask {
     private static final Logger LOGGER = 
LoggerFactory.getLogger(SchedulerTimerTask.class);
 
     private final Runnable task;
+    private final boolean terminateOnError;
 
     public SchedulerTimerTask(Runnable task) {
+        this(task, true);
+    }
+
+    public SchedulerTimerTask(Runnable task, boolean terminateOnError) {
         this.task = task;
+        this.terminateOnError = terminateOnError;
     }
 
     public void run() {
         try {
             this.task.run();
         } catch (Error error) {
-            // Very bad error. Can't swallow this but can log it.
             LOGGER.error("Scheduled task error", error);

Review Comment:
   I think the log should include the value of the terminateOnError flag here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to