InteractsWithExceptionHandling
trait InteractsWithExceptionHandling
Traits
Properties
| protected ExceptionHandler|null | $originalExceptionHandler | The original exception handler. |
Methods
Get the class name of the first parameter of the given Closure.
Get the class names of the first parameter of the given Closure, including union types.
Get the class names / types of the parameters of the given Closure.
Get the class names / types of the return type of the given Closure.
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.
Register a callback to be called after an HTTP error response is rendered.
Details
in
ReflectsClosures at line 25
protected string
firstClosureParameterType(Closure $closure)
Get the class name of the first parameter of the given Closure.
in
ReflectsClosures at line 48
protected array
firstClosureParameterTypes(Closure $closure)
Get the class names of the first parameter of the given Closure, including union types.
in
ReflectsClosures at line 74
protected array
closureParameterTypes(Closure $closure)
Get the class names / types of the parameters of the given Closure.
in
ReflectsClosures at line 94
protected array
closureReturnTypes(Closure $closure)
Get the class names / types of the return type of the given Closure.
at line 32
protected InteractsWithExceptionHandling
withExceptionHandling()
Restore exception handling.
at line 50
protected InteractsWithExceptionHandling
handleExceptions(array $exceptions)
Only handle the given exceptions via the exception handler.
at line 58
protected InteractsWithExceptionHandling
handleValidationExceptions()
Only handle validation exceptions via the exception handler.
at line 68
protected InteractsWithExceptionHandling
withoutExceptionHandling(array $except = [])
Disable exception handling for the test.
at line 82
__construct(ExceptionHandler $originalHandler, array $except = [])
No description
at line 91
void
report(Throwable $e)
Report or log an exception.
at line 98
bool
shouldReport(Throwable $e)
Determine if the exception should be reported.
at line 108
Response
render(Request $request, Throwable $e)
Render an exception into an HTTP response.
at line 130
void
renderForConsole(OutputInterface $output, Throwable $e)
Render an exception to the console.
at line 138
void
afterResponse(callable $callback)
Register a callback to be called after an HTTP error response is rendered.