Example #1
0
 /**
  * Notify on an exception
  *
  * @param Airbrake\Notice $notice
  * @return string
  */
 public function notifyOnException(Exception $exception)
 {
     $notice = new Notice();
     $notice->load(array('errorClass' => get_class($exception), 'backtrace' => $this->cleanBacktrace($exception->getTrace() ?: debug_backtrace()), 'errorMessage' => $exception->getMessage() . ' in ' . $exception->getFile() . ' on line ' . $exception->getLine()));
     return $this->notify($notice);
 }
Example #2
0
 /**
  * Notify on an exception
  *
  * @param Exception $e
  * @param null $extraParams
  * @return bool
  */
 public function notifyOnException(Exception $e, $extraParams = null)
 {
     $notice = new Notice();
     $notice->load(array('errorClass' => get_class($e), 'backtrace' => $this->cleanBacktrace($e->getTrace() ?: debug_backtrace()), 'errorMessage' => $e->getMessage() . ' in ' . $this->cleanFilePath($e->getFile()) . ' on line ' . $e->getLine(), 'extraParameters' => $extraParams));
     return $this->notify($notice);
 }