Redesign the Debug error page in prod
This commit is contained in:
parent
3d8490e59c
commit
7b9b1b9022
@ -208,8 +208,15 @@ class ExceptionHandler
|
||||
$title = 'Whoops, looks like something went wrong.';
|
||||
}
|
||||
|
||||
if (!$this->debug) {
|
||||
return <<<EOF
|
||||
<div class="container">
|
||||
<h1>$title</h1>
|
||||
</div>
|
||||
EOF;
|
||||
}
|
||||
|
||||
$content = '';
|
||||
if ($this->debug) {
|
||||
try {
|
||||
$count = count($exception->getAllPrevious());
|
||||
$total = $count + 1;
|
||||
@ -251,7 +258,6 @@ EOF
|
||||
$title = 'Whoops, looks like something went wrong.';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$symfonyGhostImageContents = $this->getSymfonyGhostAsSvg();
|
||||
|
||||
@ -278,6 +284,14 @@ EOF;
|
||||
*/
|
||||
public function getStylesheet(FlattenException $exception)
|
||||
{
|
||||
if (!$this->debug) {
|
||||
return <<<'EOF'
|
||||
body { background-color: #fff; color: #222; font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; margin: 0; }
|
||||
.container { margin: 30px; max-width: 600px; }
|
||||
h1 { color: #dc3545; font-size: 24px; }
|
||||
EOF;
|
||||
}
|
||||
|
||||
return <<<'EOF'
|
||||
body { background-color: #F9F9F9; color: #222; font: 14px/1.4 Helvetica, Arial, sans-serif; margin: 0; padding-bottom: 45px; }
|
||||
|
||||
|
Reference in New Issue
Block a user