Holds information about an error or notice that happened on a specific object.
- author Zaahid Bateson
CloneableInstantiable
Methods |
public __construct(string $message, string $psrLogLevelAsErrorLevel, ZBateson
|
public getClass() : string Returns the class type the error occurred on. |
public getException() : ?Throwable Returns the exception that occurred, if any, or null. |
public getMessage() : string Returns the error message. |
public getObject() : ZBateson Returns the object the error occurred on. |
public getPsrLevel() : string Returns the PSR string log level for this error message. |
public isPsrLevelGreaterOrEqualTo(string $minLevel) : bool Returns true if the PSR log level for this error is equal to or greater than the one passed, e.g. passing LogLevel::ERROR would return true for LogLevel::ERROR and LogLevel::CRITICAL, ALERT and EMERGENCY. |
Properties |
protected ?Throwable $exception
|
protected string $message
|
protected ZBateson
|
protected string $psrLevel
|
Properties |
private array $levelMap = ['emergency' => 0, 'alert' => 1, 'critical' => 2, 'error' => 3, 'warning' => 4, 'notice' => 5, 'info' => 6, 'debug' => 7]
|