Пример #1
0
function phabricator_shutdown()
{
    $event = error_get_last();
    if (!$event) {
        return;
    }
    if ($event['type'] != E_ERROR && $event['type'] != E_PARSE) {
        return;
    }
    $msg = ">>> UNRECOVERABLE FATAL ERROR <<<\n\n";
    if ($event) {
        // Even though we should be emitting this as text-plain, escape things just
        // to be sure since we can't really be sure what the program state is when
        // we get here.
        $msg .= phutil_escape_html($event['message']) . "\n\n";
        $msg .= phutil_escape_html($event['file'] . ':' . $event['line']);
    }
    // flip dem tables
    $msg .= "\n\n\n";
    $msg .= "┻━┻ ︵ ¯" . "\\_(ツ)_/¯ ︵ " . "┻━┻";
    phabricator_fatal($msg);
}
 /**
  * Defined in webroot/index.php.
  * TODO: Move here.
  *
  * @phutil-external-symbol function phabricator_fatal
  */
 public function fatal($message)
 {
     phabricator_fatal('FATAL ERROR: ' . $message);
 }