Exemplo n.º 1
0
function core_internalError($txt, $class = False, $forced = False)
{
    global $headerClass, $core_debug, $cnf;
    if ($GLOBALS["core_internalError"]++) {
        exit;
    }
    if (True || $forced || $core_debug || core_getOption('YBhere') || core_getOption('test')) {
        $toPrinError = True;
    } else {
        core_bug2mail($txt, 'core_internalError ' . $cnf["version"]);
        if (function_exists('apps_getBugReport')) {
            apps_getBugReport($class, $txt);
        }
        $toPrinError = function_exists('apps_internalError') ? apps_internalError($txt, $class) : True;
    }
    if ($toPrinError) {
        $message = ($class ? "class " . get_class($class) . ': ' : '') . "{$txt}";
        core_syslog("BUG {$message}");
        print "<font color='red'><h1>Internal error</h1>{$message}</font>";
        core_backtrace('internal error', $class);
        #    if     (function_exists('appsGetFooter')) appsGetFooter();
        #    elseif (@$headerClass)            $headerClass->getFooter();
        exit;
    }
}
Exemplo n.º 2
0
 function halt($msg, $sqlError = '')
 {
     if ($this->doNotStopOnErrors && !core_getOption('YBhere')) {
         print "<table><tr><td>" . "<FONT COLOR=red>" . "WARNING: The database is write-protected, the query '{$this->lastQuery_String}' is rejected, the database is not changed</font></td></tr></table>";
     } else {
         $this->close();
         if (function_exists('core_backtrace')) {
             core_backtrace();
         }
         print "<table><tr><td>" . "<FONT COLOR=red>" . "<b>{$this->Database} database error</b><br>" . "<pre>" . $this->format($msg) . "</pre>" . $sqlError . "</td></tr></table>";
         if (function_exists('appsGetFooter')) {
             appsGetFooter();
         }
         die("");
     }
 }