protected static function Report($errorMessage, $backTrace, $file, $line) { $htmlError = self::BuildBackTrace($errorMessage, $backTrace, $file, $line, true); $textError = self::BuildBackTrace($errorMessage, $backTrace, $file, $line, false); header('Status: 503 Service Temporarily Unavailable'); if (HTTPContext::Enabled()) { echo $htmlError; die; } else { echo $textError; } $userReported = true; if (!$userReported) { /** * Redirect frontend user to generic error */ Util::redirect('/error/500/'); } }