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); }
function __construct($errno, $msg_text, Structs\LocationReference $where) { $this->errno = $errno; $this->error_text = $msg_text; $this->error_location = $where; //Build Error page if (!\Radical\Core\Server::isProduction() || \Radical\Core\Server::isCLI()) { $message = 'A PHP error occurred at ' . $where->toShort() . ': ' . $msg_text; } else { $message = 'An error has occurred in the script.'; global $_ADMIN_EMAIL; if (isset($_ADMIN_EMAIL)) { $message .= ' Please report this to an administrator at ' . $_ADMIN_EMAIL . '.'; } } $fatal = false; if ($errno == E_CORE_ERROR || $errno == E_ERROR || $errno == E_RECOVERABLE_ERROR || $errno == E_USER_ERROR) { $fatal = true; } parent::__construct($message, static::HEADER, $fatal); }