Пример #1
0
 /**
  * Application fatal errors
  *
  * Log an error message and quits the application. This is done by
  * redirecting the user agent to a special page.
  *
  * @param string $message A custom message
  */
 public static function fatal($message)
 {
     debug_print_backtrace();
     flush();
     TIP::log('FATAL', $message);
     $fatal_uri = HTTP::absoluteURI(TIP_Application::getGlobal('fatal_uri'));
     if ($fatal_uri == $_SERVER['REQUEST_URI']) {
         // This is a recursive redirection
         HTTP::redirect('/fatal.html');
     } else {
         // This is the first redirection
         HTTP::redirect($fatal_uri);
     }
     exit;
 }