function error(ErrorBase $error) { $client = $this->getClient(); if ($error instanceof PHPError) { $client->errorHandler($error->getErrno(), $error->getErrorText(), $error->getErrorLocation()->file, $error->getErrorLocation()->line); } elseif (!$error instanceof ExceptionError) { $client->notifyError('error', $error->getMessage()); } if ($error->isFatal()) { throw $error; } }
function error(ErrorBase $error) { //if(!$error->isFatal()){ if ($error instanceof PHPError) { switch ($error->getErrno()) { case E_COMPILE_WARNING: case E_CORE_WARNING: case E_USER_WARNING: case E_WARNING: \Radical\CLI\Output\Error::Warning($error->getMessage()); break; case E_NOTICE: case E_STRICT: case E_USER_NOTICE: case E_USER_DEPRECATED: case E_DEPRECATED: \Radical\CLI\Output\Error::Notice($error->getMessage()); break; } } //} return parent::error($error); }
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); }
function getPage() { $this->heading = 'This Error should only be displayed in Command Line!!'; return parent::getPage(); }
function error(ErrorBase $error) { if ($error->isFatal()) { throw $error; } }