Exemplo n.º 1
0
 /**
  * @return  void
  */
 private function notify_honeybadger(\Exception $exception)
 {
     $env = $this->app->environment();
     if (!$this->ignored_user_agent($env)) {
         return $env['honeybadger.error_id'] = Honeybadger::notify_or_ignore($exception, $this->notice_options($env));
     }
 }
<?php

/**
 * Catch and notify of an exception you caught in your app.
 */
use Honeybadger\Honeybadger;
$options = (include 'config.php');
Honeybadger::$config->values($options);
try {
    throw new Exception('Oh noes! Something broke!');
} catch (Exception $e) {
    echo Honeybadger::notify_or_ignore($e);
}