original_string: private function run(TaskExecutionInterface $execution)
      {
          $start = microtime(true);
          $execution->setStartTime(new \DateTime());
          $execution->setStatus(TaskStatus::RUNNING);
          $this->taskExecutionRepository->save($execution);
  
          try {
              $execution = $this->hasPassed($execution, $this->handle($execution));
          } catch (ExitException $exception) {
              throw $exception;
          } catch (\Exception $exception) {
              $execution = $this->hasFailed($execution, $exception);
          } finally {
              $this->finalize($execution, $start);
          }
      }
code: private function run(TaskExecutionInterface $execution)
      {
          $start = microtime(true);
          $execution->setStartTime(new \DateTime());
          $execution->setStatus(TaskStatus::RUNNING);
          $this->taskExecutionRepository->save($execution);
  
          try {
              $execution = $this->hasPassed($execution, $this->handle($execution));
          } catch (ExitException $exception) {
              throw $exception;
          } catch (\Exception $exception) {
              $execution = $this->hasFailed($execution, $exception);
          } finally {
              $this->finalize($execution, $start);
          }
      }
code_tokens: private function run ( TaskExecutionInterface $ execution ) { $ start = microtime ( true ) ; $ execution -> setStartTime ( new \ DateTime ( ) ) ; $ execution -> setStatus ( TaskStatus :: RUNNING ) ; $ this -> taskExecutionRepository -> save ( $ execution ) ; try { $ execution = $ this -> hasPassed ( $ execution , $ this -> handle ( $ execution ) ) ; } catch ( ExitException $ exception ) { throw $ exception ; } catch ( \ Exception $ exception ) { $ execution = $ this -> hasFailed ( $ execution , $ exception ) ; } finally { $ this -> finalize ( $ execution , $ start ) ; } }
docstring: Run execution with given handler.
  
  @param TaskExecutionInterface $execution
  
  @throws ExitException
docstring_tokens: Run execution with given handler .