code: private void handleException(final Throwable e) {
  
          if (e instanceof ServiceException) {
              final ServiceException se = (ServiceException) e;
              // Only log with warn level to let the application continue its workflow even in developer mode
              LOGGER.log(SERVICE_TASK_EXCEPTION, se, se.getExplanation(), getServiceHandlerName());
          } else {
              // In developer mode it will stop the application throwing another exception
              LOGGER.log(SERVICE_TASK_ERROR, e, getServiceHandlerName());
          }
  
          this.wave.status(Status.Failed);
  
          final Class<? extends Throwable> managedException = e instanceof ServiceException ? e.getCause().getClass() : e.getClass();
  
          // Get the exact exception type
          final Wave exceptionHandlerWave = this.wave.waveType().waveExceptionHandler().get(managedException);
  
          if (exceptionHandlerWave != null) {
              // Fill the wave with useful data
              exceptionHandlerWave.fromClass(this.service.getClass())
                                  .add(JRebirthItems.exceptionItem, e)
                                  .add(JRebirthItems.waveItem, this.wave)
                                  .relatedWave(this.wave);
  
              LOGGER.log(SERVICE_TASK_HANDLE_EXCEPTION, e, e.getClass().getSimpleName(), getServiceHandlerName());
  
              // Send the exception wave to interested components
              this.service.sendWave(exceptionHandlerWave);
          } else {
              LOGGER.log(SERVICE_TASK_NOT_MANAGED_EXCEPTION, e, e.getClass().getSimpleName(), getServiceHandlerName());
          }
      }
docs: Handle all exception occurred while doing the task.
  
  @param e the exception to handle