RequestHalted
final class RequestHalted extends Error (View source)
Ends a controller run whose response is already written: the error page, the redirect header or the JSON body went out, and nothing may follow it.
SymfonyRouter::process() catches it and returns, which is what the exit
it replaces used to do. It is an Error rather than an Exception on purpose:
controllers wrap backend calls in catch (Exception) blocks, and a halt
raised inside one of those must not be mistaken for a failed call.
The kind and target say which site halted, so a test can assert on them.
Constants
| KIND_CONDITION |
|
| KIND_PERMISSION |
|
| KIND_ERROR |
|
| KIND_REDIRECT |
|
| KIND_RESPONSE |
|
Methods
__construct(string $kind, string $target)
No description
Details
__construct(string $kind, string $target)
No description