コード例 #1
0
ファイル: RollBar.php プロジェクト: WebChemistry/RollBar
 public function exceptionHandler($e, $exit = TRUE)
 {
     if (!is_a($e, BASE_EXCEPTION)) {
         throw new \Exception(sprintf('Report exception requires an instance of %s.', BASE_EXCEPTION));
     }
     $this->exception($e);
     Debugger::exceptionHandler($e, $exit);
 }
コード例 #2
0
 public function onKernelException(GetResponseForExceptionEvent $event)
 {
     $exception = $event->getException();
     if (Debugger::isEnabled() && !$this->isIgnoredException($exception)) {
         if ($this->storeUsernameInServerVariable && $this->tokenStorage !== null) {
             $this->storeUsernameInServerVariable();
         }
         if (Debugger::$productionMode === true) {
             Debugger::log($exception, Debugger::ERROR);
         } else {
             if (Debugger::$productionMode === false) {
                 ob_start();
                 Debugger::exceptionHandler($exception, true);
                 $event->setResponse(new Response(ob_get_contents()));
                 ob_clean();
             }
         }
     }
 }