Function __global->critical_error
Definitions
sources/critical_errors.php
- Exit with a nicely formatted critical error.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $code | string | No | No | required parameter | N/A | N/A | The error message code |
| $relay | ?string | No | No | Null | N/A | N/A | Relayed additional details (null: nothing relayed) |
| $exit | boolean | No | No | True | N/A | N/A | Whether to actually exit |
Preview
Code (PHP)
/**
* Exit with a nicely formatted critical error.
*
* @param string $code The error message code
* @param ?string $relay Relayed additional details (null: nothing relayed)
* @param boolean $exit Whether to actually exit
*/
function critical_error(string $code, ?string $relay = null, bool $exit = true)
* Exit with a nicely formatted critical error.
*
* @param string $code The error message code
* @param ?string $relay Relayed additional details (null: nothing relayed)
* @param boolean $exit Whether to actually exit
*/
function critical_error(string $code, ?string $relay = null, bool $exit = true)
