/**
  * Default mapping from throwable to {@link ExitStatus}. Clients can modify the exit code using a
  * {@link StepExecutionListener}.
  *
  * @param \Exception $e the cause of the failure
  *
  * @return ExitStatus {@link ExitStatus}
  */
 private function getDefaultExitStatusForFailure(\Exception $e)
 {
     if ($e instanceof JobInterruptedException || $e->getPrevious() instanceof JobInterruptedException) {
         $exitStatus = new ExitStatus(ExitStatus::STOPPED);
         $exitStatus->addExitDescription(get_class(new JobInterruptedException()));
     } else {
         $exitStatus = new ExitStatus(ExitStatus::FAILED);
         $exitStatus->addExitDescription($e);
     }
     return $exitStatus;
 }