trait InteractsWithExceptionHandling (View source)
protected ExceptionHandler|null | $originalExceptionHandler | The original exception handler. | |
protected | $except | ||
protected | $originalHandler |
$this | withExceptionHandling() Restore exception handling. | |
$this | handleExceptions(array $exceptions) Only handle the given exceptions via the exception handler. | |
$this | handleValidationExceptions() Only handle validation exceptions via the exception handler. | |
$this | withoutExceptionHandling(array $except = []) Disable exception handling for the test. | |
void | __construct(ExceptionHandler $originalHandler, array $except = []) Create a new class instance. | |
void | report(Throwable $e) Report or log an exception. | |
bool | shouldReport(Throwable $e) Determine if the exception should be reported. | |
Response | render(Request $request, Throwable $e) Render an exception into an HTTP response. | |
void | renderForConsole(OutputInterface $output, Throwable $e) Render an exception to the console. |
Restore exception handling.
Only handle the given exceptions via the exception handler.
Only handle validation exceptions via the exception handler.
Disable exception handling for the test.
Create a new class instance.
Report or log an exception.
Determine if the exception should be reported.
Render an exception to the console.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.html