mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
commit
5a9d0757cf
@ -72,10 +72,6 @@ class Handler extends ExceptionHandler
|
|||||||
info('account table not found');
|
info('account table not found');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// if(Account::count() == 0){
|
|
||||||
// info("handler - account table not found");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (app()->bound('sentry') && $this->shouldReport($exception)) {
|
if (app()->bound('sentry') && $this->shouldReport($exception)) {
|
||||||
app('sentry')->configureScope(function (Scope $scope): void {
|
app('sentry')->configureScope(function (Scope $scope): void {
|
||||||
@ -95,12 +91,28 @@ class Handler extends ExceptionHandler
|
|||||||
});
|
});
|
||||||
|
|
||||||
// app('sentry')->setRelease(config('ninja.app_version'));
|
// app('sentry')->setRelease(config('ninja.app_version'));
|
||||||
|
|
||||||
|
if($this->validException($exception))
|
||||||
app('sentry')->captureException($exception);
|
app('sentry')->captureException($exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
parent::report($exception);
|
parent::report($exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function validException($exception)
|
||||||
|
{
|
||||||
|
info("the exception is ");
|
||||||
|
info($exception->getMessage());
|
||||||
|
|
||||||
|
if(strpos($exception->getMessage(), 'file_put_contents') === TRUE)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if(strpos($exception->getMessage(), 'Permission denied') === TRUE)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Render an exception into an HTTP response.
|
* Render an exception into an HTTP response.
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user