Skip to content

Commit 2fa3c52

Browse files
Add missing import for clarity and to eliminate confusion (#10267)
1 parent d60c35d commit 2fa3c52

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

errors.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ In Laravel, exception reporting is used to log exceptions or send them to an ext
3737
If you need to report different types of exceptions in different ways, you may use the `report` exception method in your application's `bootstrap/app.php` to register a closure that should be executed when an exception of a given type needs to be reported. Laravel will determine what type of exception the closure reports by examining the type-hint of the closure:
3838

3939
```php
40+
use App\Exceptions\InvalidOrderException;
41+
4042
->withExceptions(function (Exceptions $exceptions) {
4143
$exceptions->report(function (InvalidOrderException $e) {
4244
// ...
@@ -47,6 +49,8 @@ If you need to report different types of exceptions in different ways, you may u
4749
When you register a custom exception reporting callback using the `report` method, Laravel will still log the exception using the default logging configuration for the application. If you wish to stop the propagation of the exception to the default logging stack, you may use the `stop` method when defining your reporting callback or return `false` from the callback:
4850

4951
```php
52+
use App\Exceptions\InvalidOrderException;
53+
5054
->withExceptions(function (Exceptions $exceptions) {
5155
$exceptions->report(function (InvalidOrderException $e) {
5256
// ...

0 commit comments

Comments
 (0)