File tree 1 file changed +1
-21
lines changed
1 file changed +1
-21
lines changed Original file line number Diff line number Diff line change @@ -3575,32 +3575,12 @@ exceptions that match the given exception class:
3575
3575
3576
3576
<framework : config >
3577
3577
<framework : exceptions >
3578
- <exception id =" Symfony\Component\HttpKernel\Exception\BadRequestHttpException" >
3579
- <framework : log_level >debug</framework : log_level >
3580
- <framework : status_code >422</framework : status_code >
3581
- </exception >
3578
+ <framework : exception name =" Symfony\Component\HttpKernel\Exception\BadRequestHttpException" log-level =" info" status-code =" 422" />
3582
3579
</framework : exceptions >
3583
3580
<!-- ... -->
3584
3581
</framework : config >
3585
3582
</container >
3586
3583
3587
- .. code-block :: php
3588
-
3589
- // config/packages/exceptions.php
3590
- use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
3591
- use Symfony\Config\FrameworkConfig;
3592
-
3593
- return static function (FrameworkConfig $framework) {
3594
- $framework
3595
- ->exceptions(BadRequestHttpException::class)
3596
- ->log_level('debug');
3597
-
3598
- $framework
3599
- ->exceptions(BadRequestHttpException::class)
3600
- ->status_code(422);
3601
- ;
3602
- };
3603
-
3604
3584
The order in which you configure exceptions is important because Symfony will
3605
3585
use the configuration of the first exception that matches ``instanceof ``:
3606
3586
You can’t perform that action at this time.
0 commit comments