This website uses Cookies to provide you with the best possible service. Please see our Privacy Policy for more information. Click the check box below to accept cookies. Then confirm with a click on "Save".  
Status: 2023-12-28

Error


TLDR;

Error::notice('this is a notice');
Error::warning('this is a warning');
Error::error('this is an error');
Error::exception(new \Exception('this is an exception'));
Error::fatal();

$aError = Error::get();

notice

Error::notice (string $sMessage = '', int $iCode = E_NOTICE, int $iSeverity = 0, string $sFilename = '', int $iLineNr = 0) : void

Example

Error::notice('this is a notice');

warning

Error::warning (string $sMessage = '', int $iCode = E_WARNING, int $iSeverity = 0, string $sFilename = '', int $iLineNr = 0) : void

Example

Error::warning('this is a warning');

error

Error::error (string $sMessage = '', int $iCode = E_ERROR, int $iSeverity = 0, string $sFilename = '', int $iLineNr = 0) : void

Example

Error::error('this is an error');

exception

Error::exception(\Exception $oErrorException) : void

Example

Error::exception(new \Exception('this is an exception'));

fatal

Error::function fatal() : void

Example

Error::fatal();

get

Error::get() : array

Example

$aError = Error::get();

Example Retrieving error data using ArrDot

$oArrDot = new ArrDot(Error::get());

info(
    $oArrDot->get('0.aKeyValue')
);
display(
    $oArrDot->getIndexOnValue('this is an error')
);