InteractsWithExceptionHandling
trait InteractsWithExceptionHandling (View source)
Properties
protected ExceptionHandler|null | $originalExceptionHandler | The original exception handler. | |
protected | $except | ||
protected | $originalHandler |
Methods
$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(Exception $e) Report the given exception. | |
mixed | render(Request $request, Exception $e) Render the given exception. | |
void | renderForConsole(OutputInterface $output, Exception $e) Render the exception for the console. |
Details
protected $this withExceptionHandling()
Restore exception handling.
protected $this handleExceptions(array $exceptions)
Only handle the given exceptions via the exception handler.
protected $this handleValidationExceptions()
Only handle validation exceptions via the exception handler.
protected $this withoutExceptionHandling(array $except = [])
Disable exception handling for the test.
void __construct(ExceptionHandler $originalHandler, array $except = [])
Create a new class instance.
void report(Exception $e)
Report the given exception.
void renderForConsole(OutputInterface $output, Exception $e)
Render the exception for the console.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.7/Illuminate/Foundation/Testing/Concerns/InteractsWithExceptionHandling.html