Comments (5)
Yeah, this is for sure an issue, and likely going to be incredibly difficult to fix.
from bugsnag-laravel.
I was able to thwart this issue by doing the following:
- NOT include the
BugsnagLaravelServiceProvider
- Using
php artisan make:provider BugsnagServiceProvider
- Editing this provider to include the same
register()
method as the shipped provider. - Updating my
App\Exceptions\Handler
(except it's notApp
), and replacing thatreport()
method with the samereport()
method as the shipped handler.
from bugsnag-laravel.
Also having this issue. Should bugsnag extend Illuminate\Foundation\Exceptions\Handler instead?
from bugsnag-laravel.
An alt to doing what adamgoose suggested.
http://laravel.com/docs/5.0/errors#handling-errors
We can temp put this in the main handler:
app/Exceptions/Handler.php
public function report(Exception $e)
{
$shouldReport = true;
foreach ($this->dontReport as $type)
{
if ($e instanceof $type)
{
$shouldReport = false;
}
}
if ($shouldReport)
{
$bugsnag = \App::make('bugsnag');
$bugsnag->notifyException($e);
}
return parent::report($e);
}
We need to override the singleton they bind in their service provider but keep all the rest of the functionality.
So then make your own exception service provider and place it right after the bugsnag one with this in it:
config/app.php
'providers' => ...
'Bugsnag\BugsnagLaravel\BugsnagLaravelServiceProvider',
'MyNamespace\Providers\ExceptionServiceProvider',
app/Providers/ExceptionServiceProvider.php
<?php namespace MyNamespace\Providers;
use Illuminate\Support\ServiceProvider;
class ExceptionServiceProvider extends ServiceProvider {
public function boot()
{
$this->app->singleton('Illuminate\Contracts\Debug\ExceptionHandler', 'MyNamespace\Exceptions\Handler');
}
public function register(){}
}
from bugsnag-laravel.
I'd love feedback on #40 — would that work for everyone?
from bugsnag-laravel.
Related Issues (20)
- PHP 8.1 Deprecated messages HOT 7
- Session tracker throttling not working with some cache drivers (eg. Redis) HOT 3
- Prepare for Laravel 9 support HOT 5
- Ignore Exceptions in Laravel HOT 2
- Fails composer install for Laravel 9 HOT 2
- Laravel service provider: config is null HOT 5
- Updating minor version HOT 1
- setMetaData doesn't clear between horizon jobs HOT 2
- Unable to create configured logger HOT 6
- PHP Fatal error: Declaration of Bugsnag\PsrLogger\BugsnagLogger::log HOT 4
- Vulnerable versions of Akaunting and Bookstack packages are used HOT 2
- Bugsnag Shows js stack trace and php error codes but no php stacktrace. HOT 2
- Delay session delivery to "after the response is sent" HOT 1
- Error with PHP8.1, Laravel 9.x HOT 2
- laravel 10 compatibility HOT 2
- Update to Laravel 10 HOT 1
- Integrate with Pennant feature flags HOT 1
- [OomBootstrapper] BindingResolutionException: Target class [bugsnag] does not exist. HOT 3
- Ability to cancel error notifications before they are sent to Bugsnag HOT 1
- How to set app version automatically? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bugsnag-laravel.