private void doCleanUpOnTaskException(Throwable throwable) {
    stopScheduler();

    scheduledTaskCallback.ifPresent(callback -> callback.onError(throwable));
  }
Handler method to invoke on a exception during an scheduled task execution and which
the following operations in sequential order.
<ul>
  <li> Stop the scheduler. If the task execution fails or a task is interrupted, scheduler will not accept/execute any new tasks.</li>
  <li> Invokes the onError handler method if taskCallback is defined.</li>
</ul>

@param throwable the exception happened during task execution.
samza-core/src/main/java/org/apache/samza/zk/ScheduleAfterDebounceTime.java