示例#1
0
 /**
  * Handle exception object
  * @param \Exception $exception
  */
 public function handleException(\Exception $exception)
 {
     if (!$this->isStarted || $this->isHandlingDisabled()) {
         return;
     }
     try {
         $this->onHandlingStart();
         $this->connector->getErrorsDispatcher()->dispatchException($exception);
         if ($this->oldExceptionsHandler && $this->callOldHandlers) {
             call_user_func($this->oldExceptionsHandler, $exception);
         }
     } catch (\Exception $internalException) {
         $this->handleException($internalException);
     }
     $this->onHandlingComplete();
 }