You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if ($this->container->call($reportCallable) !== false) {
return;
}
So when the report method returns NOT false the exception will not be reported. Hence return void in the Handler class.
This does not seem to match with the report method docblock above. I would expect if the report method returns false it will not be reported (no log entry) but the Handler class does the opposite.
Anyone who does understand this behaviour?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
When writing custom Exceptions with a render & report method (see https://laravel.com/docs/8.x/errors#renderable-exceptions).
I do not understand the report method.
According to the documentation the method looks like this:
This method is called from the Illuminate\Foundation\Exceptions\Handler class on the following line:
framework/src/Illuminate/Foundation/Exceptions/Handler.php
Lines 228 to 230 in 36dfae9
So when the report method returns NOT false the exception will not be reported. Hence return void in the Handler class.
This does not seem to match with the report method docblock above. I would expect if the report method returns false it will not be reported (no log entry) but the Handler class does the opposite.
Anyone who does understand this behaviour?
Beta Was this translation helpful? Give feedback.
All reactions