getStatusMessageByCode() public static method

Returns the human-readable message for the given status code.
public static getStatusMessageByCode ( integer $statusCode ) : string
$statusCode integer
return string
 /**
  * @return integer
  */
 public function getStatusCode()
 {
     $statusCode = $this->tsValue('statusCode');
     if ($statusCode === null) {
         $statusCode = 200;
     }
     if (Response::getStatusMessageByCode($statusCode) === 'Unknown Status') {
         throw new \InvalidArgumentException('Unknown HTTP status code', 1412085703);
     }
     return (int) $statusCode;
 }
    /**
     * Returns the statically rendered exception message
     *
     * @param integer $statusCode
     * @param object $exception \Exception or \Throwable
     * @return void
     */
    protected function renderStatically($statusCode, $exception)
    {
        $statusMessage = Response::getStatusMessageByCode($statusCode);
        $exceptionHeader = '';
        while (true) {
            $pathPosition = strpos($exception->getFile(), 'Packages/');
            $filePathAndName = $pathPosition !== false ? substr($exception->getFile(), $pathPosition) : $exception->getFile();
            $exceptionCodeNumber = $exception->getCode() > 0 ? '#' . $exception->getCode() . ': ' : '';
            $exceptionMessageParts = $this->splitExceptionMessage($exception->getMessage());
            $exceptionHeader .= '<h2 class="ExceptionSubject">' . $exceptionCodeNumber . htmlspecialchars($exceptionMessageParts['subject']) . '</h2>';
            if ($exceptionMessageParts['body'] !== '') {
                $exceptionHeader .= '<p class="ExceptionBody">' . nl2br(htmlspecialchars($exceptionMessageParts['body'])) . '</p>';
            }
            $exceptionHeader .= '
				<span class="ExceptionProperty">' . get_class($exception) . '</span> thrown in file<br />
				<span class="ExceptionProperty">' . $filePathAndName . '</span> in line
				<span class="ExceptionProperty">' . $exception->getLine() . '</span>.<br />';
            if ($exception instanceof FlowException) {
                $exceptionHeader .= '<span class="ExceptionProperty">Reference code: ' . $exception->getReferenceCode() . '</span><br />';
            }
            if ($exception->getPrevious() === null) {
                break;
            }
            $exceptionHeader .= '<br /><div style="width: 100%; background-color: #515151; color: white; padding: 2px; margin: 0 0 6px 0;">Nested Exception</div>';
            $exception = $exception->getPrevious();
        }
        $backtraceCode = Debugger::getBacktraceCode($exception->getTrace());
        echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
				"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
			<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
			<head>
				<title>' . $statusCode . ' ' . $statusMessage . '</title>
				<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
				<style>
					.ExceptionSubject {
						margin: 0;
						padding: 0;
						font-size: 15px;
						color: #BE0027;
					}
					.ExceptionBody {
						padding: 10px;
						margin: 10px;
						color: black;
						background: #DDD;
					}
					.ExceptionProperty {
						color: #101010;
					}
					pre {
						margin: 0;
						font-size: 11px;
						color: #515151;
						background-color: #D0D0D0;
						padding-left: 30px;
					}
				</style>
			</head>
			<div style="
					position: absolute;
					left: 10px;
					background-color: #B9B9B9;
					outline: 1px solid #515151;
					color: #515151;
					font-family: Arial, Helvetica, sans-serif;
					font-size: 12px;
					margin: 10px;
					padding: 0;
				">
				<div style="width: 100%; background-color: #515151; color: white; padding: 2px; margin: 0 0 6px 0;">Uncaught Exception in Flow</div>
				<div style="width: 100%; padding: 2px; margin: 0 0 6px 0;">
					' . $exceptionHeader . '
					<br />
					' . $backtraceCode . '
				</div>
			</div>
		';
    }
    /**
     * Returns the statically rendered exception message
     *
     * @param integer $statusCode
     * @param string $referenceCode
     * @return string
     */
    protected function renderStatically($statusCode, $referenceCode)
    {
        $statusMessage = Response::getStatusMessageByCode($statusCode);
        $referenceCodeMessage = $referenceCode !== null ? '<p>When contacting the maintainer of this application please mention the following reference code:<br /><br />' . $referenceCode . '</p>' : '';
        return '<!DOCTYPE html>
			<html>
				<head>
					<meta charset="UTF-8">
					<title>' . $statusCode . ' ' . $statusMessage . '</title>
					<style type="text/css">
						body {
							font-family: Helvetica, Arial, sans-serif;
							margin: 0;
						}

						h1 {
							font-size: 15px;
						}

						.ApplicationWindow {
							position: absolute;
							width: 100%;
							height: 100%;
							background-color: #515151;
							margin: 0;
							z-index:1000;
						}

						.FloatingWindow {
							width: 500px;
							height: 360px;
							background-color: none;
							background-image: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAfkAAAFwCAYAAAC7CQL0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKL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NfbTvL5+vvxHwXpMn5uHz0AXJbYp/vR02X59aQeR329zVdNPI0Cv+7hsuMPi3Wn27GTfOkgu3iCv5aJ+04IYTf6OI1910Tft2QPABc18LkpPjfBp3GfdzQx9xh1MtFvvE8+Df0kE/idJO67IYS9JPQ74ezyfXpgXuloewC4yIHPTfLpgXXp8vw67rNME+tM/9LHqYZM8H2RD+HswXbx8nwc970o7vtR8HczE31p2d4kD8BVmORLy/TxBD9LutgV+HiKb8M5HHhXDZjk48DvR7f7SfTTpfshS/YmeQAu4yRfWqpPl+jjVe64g+n9507Bq8ZM86UD74Ys1cdh3w8hvJYJfbxsX1qyTw++C4XnBAAXIey5GLeZyMdL9fNoi4fe3IHnfRfQiVs9+MC70tXt6o4pfi8K/PUk9LvJNN8VeUfXA3BZw1+a5BeZSX6WiXxX3ONVgTozyXeGvuvAu9IR9fGBdmngr7dte72u67fquv5z27avhRCmbdv63wCAV1ZVVSGEsKiq6knTNN83TfN9VVVdS/TLwrY+wn6QIafQxefFp/vi46X6623bHtR1/e7t27ff++CDD/54eHg4uXHjhlcXgFfeL7/8En744YflZ5999q979+79vWmar1fxD6F7n368+j3qIPVpT+DjffK5Sf557FcT/Lsff/zxX+/cuXPdywkAv7l582a4efPm5J133nnz7bffvvHJJ5+Epmn+VlVV1yl318JvF9HJXVtm9MVwQsckH58+txdt+5PJ5C+3b99+7+7du9ejv0wAgMTdu3evf/PNN+8dHR39p2mah+Hs/vud8L99+PGxbKOPX5sOCHxpv3y8dL9b1/VbH3744eFkMvHqAUCPjz766PCLL774U9M0j8LZ0+zSU8/rTULfdwpdFc5erz692t1OCGG3aZr9N954o67r2isHAD1u3bpVN03z2mpgnofy1WLXHR79Zm59k/zQa9bvhBDq/f19rxoADLBqZp2J+7XCJD/6lPMhR9eX3oHuhdC3bRtM8QAw3OoU89zVYUtXiN3q6Po09kPeYnb9ucgDwHilruZCX42949wE33X9+vhNZqYiDwDnEvlp0tjS+fHpttEV70r75kuhD06dA4CNI58Gvg75ff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xL0a3bVsvAQBcQbVfAQCIPAAg8gCAyAMAIg8AiDwAiLxfAQCIPAAg8gDAy/bfAQDpDpA3DxeAjAAAAABJRU5ErkJggg==);
						}

						.FloatingWindow .Window_TitleBar {
							font-size: 13px;
							position: relative;
							padding: 25px 0 0 26px;
							width: 440px;
							text-align: center;
							color: #404040;
						}

						.FloatingWindow .Window_Body {
							font-size: 14px;
							position: relative;
							padding: 30px 0 0 50px;
							width: 400px;
							text-align: left;
							color: #202020;
							line-height: 18px;
						}

						.StandardView_Package {
							width: 70px;
							float: right;
							margin: 0 0 80px 10px;
						}
					</style>

					<!--[if lte IE 7]>
					<style type="text/css">
						.FloatingWindow {
							background-color: #ccc;
							background-image: none;
						}
						.Window_TitleBar {
							background-color:#aaa;
							font-weight:bold;
						}
						.StandardView_Package {
							display:none;
						}
					</style>
					<![endif]-->

				</head>
				<body>
					<div class="ApplicationWindow">
						<div class="FloatingWindow">
							<div class="Window_TitleBar">' . $statusCode . ' ' . $statusMessage . '</div>
							<div class="Window_Body">
								<h1>' . $statusCode . ' ' . $statusMessage . '</h1>
								<p>An internal error occurred.</p>
								' . $referenceCodeMessage . '
							</div>
						</div>
					</div>
				</body>
			</html>';
    }
Beispiel #4
0
 /**
  * Returns the statically rendered exception message
  *
  * @param integer $statusCode
  * @param object $exception \Exception or \Throwable
  * @return void
  */
 protected function renderStatically($statusCode, $exception)
 {
     $statusMessage = Response::getStatusMessageByCode($statusCode);
     $exceptionHeader = '<div class="Flow-Debug-Exception-Header">';
     while (true) {
         $filepaths = Debugger::findProxyAndShortFilePath($exception->getFile());
         $filePathAndName = $filepaths['proxy'] !== '' ? $filepaths['proxy'] : $filepaths['short'];
         $exceptionMessageParts = $this->splitExceptionMessage($exception->getMessage());
         $exceptionHeader .= '<h1 class="ExceptionSubject">' . htmlspecialchars($exceptionMessageParts['subject']) . '</h1>';
         if ($exceptionMessageParts['body'] !== '') {
             $exceptionHeader .= '<p class="ExceptionBody">' . nl2br(htmlspecialchars($exceptionMessageParts['body'])) . '</p>';
         }
         $exceptionHeader .= '<table class="Flow-Debug-Exception-Meta"><tbody>';
         $exceptionHeader .= '<tr><th>Exception Code</th><td class="ExceptionProperty">' . $exception->getCode() . '</td></tr>';
         $exceptionHeader .= '<tr><th>Exception Type</th><td class="ExceptionProperty">' . get_class($exception) . '</td></tr>';
         if ($exception instanceof FlowException) {
             $exceptionHeader .= '<tr><th>Log Reference</th><td class="ExceptionProperty">' . $exception->getReferenceCode() . '</td></tr>';
         }
         $exceptionHeader .= '<tr><th>Thrown in File</th><td class="ExceptionProperty">' . $filePathAndName . '</td></tr>';
         $exceptionHeader .= '<tr><th>Line</th><td class="ExceptionProperty">' . $exception->getLine() . '</td></tr>';
         if ($filepaths['proxy'] !== '') {
             $exceptionHeader .= '<tr><th>Original File</th><td class="ExceptionProperty">' . $filepaths['short'] . '</td></tr>';
         }
         $exceptionHeader .= '</tbody></table>';
         if ($exception->getPrevious() === null) {
             break;
         }
         $exceptionHeader .= '<br /><h2>Nested Exception</h2>';
         $exception = $exception->getPrevious();
     }
     $exceptionHeader .= '</div>';
     $backtraceCode = Debugger::getBacktraceCode($exception->getTrace());
     $footer = '<div class="Flow-Debug-Exception-Footer">';
     $footer .= '<table class="Flow-Debug-Exception-InstanceData"><tbody>';
     if (defined('FLOW_PATH_ROOT')) {
         $footer .= '<tr><th>Instance root</th><td class="ExceptionProperty">' . FLOW_PATH_ROOT . '</td></tr>';
     }
     if (Bootstrap::$staticObjectManager instanceof ObjectManagerInterface) {
         $bootstrap = Bootstrap::$staticObjectManager->get(Bootstrap::class);
         $footer .= '<tr><th>Application Context</th><td class="ExceptionProperty">' . $bootstrap->getContext() . '</td></tr>';
         $footer .= '<tr><th>Request Handler</th><td class="ExceptionProperty">' . get_class($bootstrap->getActiveRequestHandler()) . '</td></tr>';
     }
     $footer .= '</tbody></table>';
     $footer .= '</div>';
     echo sprintf($this->htmlExceptionTemplate, $statusCode . ' ' . $statusMessage, file_get_contents(__DIR__ . '/../../Resources/Public/Error/Exception.css'), $exceptionHeader, $backtraceCode, $footer);
 }
 /**
  * Prepares a Fluid view for rendering the custom error page.
  *
  * @param object $exception \Exception or \Throwable
  * @param array $renderingOptions Rendering options as defined in the settings
  * @return ViewInterface
  */
 protected function buildView($exception, array $renderingOptions)
 {
     $statusCode = 500;
     $referenceCode = null;
     if ($exception instanceof FlowException) {
         $statusCode = $exception->getStatusCode();
         $referenceCode = $exception->getReferenceCode();
     }
     $statusMessage = Response::getStatusMessageByCode($statusCode);
     $viewClassName = $renderingOptions['viewClassName'];
     /** @var ViewInterface $view */
     $view = $viewClassName::createWithOptions($renderingOptions['viewOptions']);
     $view = $this->applyLegacyViewOptions($view, $renderingOptions);
     $httpRequest = Request::createFromEnvironment();
     $request = new ActionRequest($httpRequest);
     $request->setControllerPackageKey('Neos.Flow');
     $uriBuilder = new UriBuilder();
     $uriBuilder->setRequest($request);
     $view->setControllerContext(new ControllerContext($request, new Response(), new Arguments([]), $uriBuilder));
     if (isset($renderingOptions['variables'])) {
         $view->assignMultiple($renderingOptions['variables']);
     }
     $view->assignMultiple(['exception' => $exception, 'renderingOptions' => $renderingOptions, 'statusCode' => $statusCode, 'statusMessage' => $statusMessage, 'referenceCode' => $referenceCode]);
     return $view;
 }