public function ShowError($errorText, $file = null, $line = null)
{
$errorCode = 0;
if (is_numeric($errorText)) {
$errorCode = (int) $errorText;
$errorText = $this->lang['error'][$errorText];
}
if ($errorCode == 2) {
Http404();
}
ZBlogException::$error_id = $errorCode;
ZBlogException::$error_file = $file;
ZBlogException::$error_line = $line;
foreach ($GLOBALS['hooks']['Filter_Plugin_Zbp_ShowError'] as $fpname => &$fpsignal) {
$fpsignal = PLUGIN_EXITSIGNAL_NONE;
$fpreturn = $fpname($errorCode, $errorText, $file, $line);
if ($fpsignal == PLUGIN_EXITSIGNAL_RETURN) {
return $fpreturn;
}
}
throw new Exception($errorText);
}