Log NamiException
This commit is contained in:
parent
27651ce006
commit
e9cda2f67d
|
@ -4,6 +4,7 @@ namespace App\Exceptions;
|
||||||
|
|
||||||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
||||||
use Throwable;
|
use Throwable;
|
||||||
|
use Zoomyboy\LaravelNami\NamiException;
|
||||||
|
|
||||||
class Handler extends ExceptionHandler
|
class Handler extends ExceptionHandler
|
||||||
{
|
{
|
||||||
|
@ -36,6 +37,13 @@ class Handler extends ExceptionHandler
|
||||||
*/
|
*/
|
||||||
public function report(Throwable $exception)
|
public function report(Throwable $exception)
|
||||||
{
|
{
|
||||||
|
if (is_a($exception, NamiException::class)) {
|
||||||
|
\Log::error($exception->getMessage(), [
|
||||||
|
'request' => $exception->request,
|
||||||
|
'response' => $exception->response
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
parent::report($exception);
|
parent::report($exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue