Ejemplo n.º 1
0
 public function testPreviousException()
 {
     if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
         $exception = new Exception("secondly", 65533, new Exception("firstly"));
         $error = Bugsnag_Error::fromPHPThrowable($this->config, $this->diagnostics, $exception);
         $errorArray = $error->toArray();
         $this->assertEquals(count($errorArray['exceptions']), 2);
         $this->assertEquals($errorArray['exceptions'][0]['message'], 'firstly');
         $this->assertEquals($errorArray['exceptions'][1]['message'], 'secondly');
     }
 }
Ejemplo n.º 2
0
Archivo: Client.php Proyecto: DbyD/cruk
 public function exceptionHandler($throwable)
 {
     if (!$this->config->autoNotify) {
         return;
     }
     $error = Bugsnag_Error::fromPHPThrowable($this->config, $this->diagnostics, $throwable);
     $error->setSeverity("error");
     $this->notify($error);
 }
Ejemplo n.º 3
0
 public function setPrevious($exception)
 {
     if ($exception) {
         $this->previous = Bugsnag_Error::fromPHPThrowable($this->config, $this->diagnostics, $exception);
     }
     return $this;
 }