/** * Calls the init functions for all the error modules */ function __construct() { //Itterate all error trackers foreach (\Radical\Core\Libraries::get(self::ERRORS_EXPR) as $class) { $class::Init(); } parent::__construct(); }
function __construct($message, $code) { //Store Code $this->code = strtoupper($code); //Do parent parent::__construct($message, '', false); //Send to Exception $errorHandler = \Radical\Core\ErrorHandling\Handler::getInstance(); $errorHandler->Exception($this); }
static function output($code, $str, $error) { $str = static::E($str); if (self::$ERROR_LEVEL & $error) { $errorHandler = Handler::getInstance(); if ($errorHandler->isNull()) { $str = sprintf(static::FORMAT, $code, $str); parent::Output($str); } else { new Error\OutputError($str, $code); } } }
/** * Is called when an unhandled exception is received. * * @param ErrorException $ex the error exception defining the unhandled exception * @param bool $fatal usually is true (fatal) */ private static function handleException(ErrorException $ex, $fatal = false) { if ($ex->isFatal() || $fatal) { Handler::getInstance()->Exception($ex); } }
function execute($method = 'GET') { $request = new PageRequest($this); ErrorHandling\Handler::Handle(array($request, 'Execute'), array($method)); }
function __construct($message, $header = 'An error has occurred', $fatal = false) { parent::__construct($message, $header, $fatal); $errorHandler = Handler::getInstance(); $errorHandler->Error($this); }