"Could not open configuration file", 1 => "Could not connect to database", 2 => "Failed to set up tracking data", 3 => "Failed to set up tracking data", 4 => "Failed to set up tracking data", 5 => "Failed to set up tracking data", 6 => 'Invalid request', 7 => 'Invalid request', 8 => 'Page not found', 9 => 'Page not found', 10 => 'Internal error', 11 => 'Internal error', 12 => "Failed to set up session data", 13 => "Failed to set up session data", 14 => "Failed to set up session data", 15 => "Failed to set up session data", 16 => 'Internal error', 17 => 'Internal error', 18 => "Internal error", 19 => 'Internal error', 20 => 'Internal error', 21 => 'Internal error', 22 => 'Internal error', 23 => 'Internal error', 24 => 'Internal error', 25 => 'Internal error', 26 => 'Invalid extension', 27 => 'Unhandled extension', 28 => 'Internal error', 29 => 'Internal error', 30 => 'Resource not found', 31 => 'Unhandler extension', ); /** This variable indicates whether the logging system has * been initialised. */ private static $initialised = false; /** This variable contains the prefix to use when writing * to syslog. */ private static $syslogPrefix = "lwEngine"; /** This variable defines a text that is used as a prefix * when logging strings. */ private static $prefix = ""; /** This variable prevents multiple "deprecated" entries from * being logged. */ private static $deprecatedLogged = false; /** This variable prevents multiple "FIXME" entries from * being logged. */ private static $fixmeLogged = false; /** This function is the default fatal error display function. */ private function defaultFatalError($errno, $error, $info) { ob_start(); ?> Legacy Worlds

The LegacyWorlds game engine encountered a fatal error:

Please report this error by sending an e-mail to the staff at webmaster@legacyworlds.com explaining what happened.

30 ? 1 : (31 - $cnLength)) . $data['class'] . " :: " . $data['function']; if (!is_null($data['file'])) { $cnLength = strlen($data['function']); $fn = preg_replace("#^$base/#", "", $data['file']); $str .= str_repeat(' ', $cnLength > 25 ? 1 : (26 - $cnLength)) . " (line {$data['line']}, file '$fn')"; } self::info($str); } } /** This method changes the syslog prefix. */ public function setSyslogPrefix($prefix) { self::$syslogPrefix = $prefix; if (self::$initialised) { closelog(); self::$initialised = false; } } /** This method changes the string prefix. */ public function setPrefix($prefix) { self::$prefix = "$prefix "; } /** This method changes the function to call * for fatal errors. */ public function setFatalHandler($function) { self::$fatalErrorCallback = $function; } /** This function logs the use of a deprecated * function call and prevents further logging of * similar occurences. */ public function deprecated($function) { if (config::$main['debug'] == 2 && !self::$deprecatedLogged) { l::trace("DEPRECATED: $function"); l::backtrace(); self::$deprecatedLogged = true; } } /** This function logs FIXME's. */ public function FIXME($text) { if (config::$main['debug'] >= 1 && !self::$fixmeLogged) { l::debug("FIXME: $text"); if (config::$main['debug'] == 2) { l::backtrace(); } self::$fixmeLogged = true; } } /******************* LOGGING METHODS ************************/ /* These methods should replace logText() wherever possible */ /************************************************************/ public function crit($txt) { self::init(); self::__write($txt, LOG_CRIT); } public function critical($txt) { self::init(); self::__write($txt, LOG_CRIT); } public function error($txt) { self::init(); self::__write($txt, LOG_ERR); } public function warn($txt) { self::init(); self::__write($txt, LOG_WARNING); } public function warning($txt) { self::init(); self::__write($txt, LOG_WARNING); } public function notice($txt) { self::init(); self::__write($txt, LOG_NOTICE); } public function info($txt) { self::init(); self::__write($txt, LOG_INFO); } public function debug($txt) { if (config::$main['debug'] >= 1) { self::init(); self::__write($txt, LOG_DEBUG); } } public function trace($txt) { if (config::$main['debug'] == 2) { self::init(); self::__write($txt, LOG_DEBUG); } } } /** This function writes an entry to the system log. */ function logText($txt, $level = null) { l::deprecated("logText()"); l::write($txt, $level); } /** This function displays one of the game engine's fatal errors and adds * log entries accordingly. */ function fatalError($errno, $information = null) { l::deprecated("fatalError($errno)"); l::fatal($errno, $information); } ?>