ErrorException
API reference › yii › base › ErrorException
ErrorException represents a PHP error.
For more details and usage information on ErrorException, see the guide article on handling errors.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
__construct() | Constructs the exception. | ErrorException |
getName() | ErrorException | |
isFatalError() static | Returns if error is one of fatal type. | ErrorException |
Method details
Section titled “Method details”__construct()
Section titled “__construct() ”public function __construct(string $message = '', int $code = 0, int $severity = 1, string $filename = __FILE__, int $lineno = __LINE__, Throwable|null $previous = null)Constructs the exception.
Parameters
| Parameter | Type | Description |
|---|---|---|
$message | string | [optional] |
$code | int | [optional] |
$severity | int | [optional] |
$filename | string | [optional] |
$lineno | int | [optional] |
$previous | Throwable| | [optional] |
getName()
Section titled “getName() ”public function getName(): stringReturns
string: The user-friendly name of this exception
isFatalError()
Section titled “isFatalError() ”public static function isFatalError(array $error): boolReturns if error is one of fatal type.
Parameters
| Parameter | Type | Description |
|---|---|---|
$error | array | Error got from error_get_last() |
Returns
bool: If error is one of fatal type