Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Logging: Exception Handler
  • Loading branch information
iamacarpet committed May 1, 2019
1 parent d751414 commit 95600c7
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/A1comms/GaeSupportLaravel/Foundation/Exceptions/Handler.php
@@ -0,0 +1,32 @@
<?php

namespace A1comms\GaeSupportLaravel\Foundation\Exceptions;

use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use A1comms\GaeSupportLaravel\Integration\ErrorReporting\Report as ErrorBootstrap;

class Handler extends ExceptionHandler
{
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
{
parent::report($exception);

// Log the error out to Stackdriver Error Reporting.
if ($this->shouldReport($e)) {
try {
ErrorBootstrap::exceptionHandler($e);
} catch (Exception $ex) {

}
}
}
}

0 comments on commit 95600c7

Please sign in to comment.