Skip to content

Commit

Permalink
[BUGFIX] Make debug exceptions scrollable in backend context
Browse files Browse the repository at this point in the history
Resolves: #86132
Releases: master
Change-Id: I34a09ec83491b0f08e0a094680fbd93057ad76a4
Reviewed-on: https://review.typo3.org/58172
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
  • Loading branch information
benjaminkott authored and georgringer committed Sep 4, 2018
1 parent a36aadf commit d66fd78
Showing 1 changed file with 74 additions and 40 deletions.
114 changes: 74 additions & 40 deletions typo3/sysext/core/Classes/Error/DebugExceptionHandler.php
Expand Up @@ -118,19 +118,21 @@ protected function getContent(\Throwable $throwable): string
$typo3Logo = $this->getTypo3LogoAsSvg();

return <<<HTML
<div class="exception-summary">
<div class="container">
<div class="exception-message-wrapper">
<div class="exception-illustration hidden-xs-down">$typo3Logo</div>
<h1 class="exception-message break-long-words">Whoops, looks like something went wrong.</h1>
<div class="exception-page">
<div class="exception-summary">
<div class="container">
<div class="exception-message-wrapper">
<div class="exception-illustration hidden-xs-down">$typo3Logo</div>
<h1 class="exception-message break-long-words">Whoops, looks like something went wrong.</h1>
</div>
</div>
</div>
</div>
$exceptionInfo
$exceptionInfo
<div class="container">
$content
<div class="container">
$content
</div>
</div>
HTML;
}
Expand Down Expand Up @@ -183,15 +185,27 @@ protected function getSingleThrowableContent(\Throwable $throwable, int $index,
protected function getStylesheet(): string
{
return <<<STYLESHEET
html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-ms-overflow-style: scrollbar;
-webkit-tap-highlight-color: transparent;
}
body {
background-color: #ffffff;
color: #000000;
font: 100%/1.3 Verdana, Arial, Helvetica, sans-serif;
margin: 0;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
color: #212121;
text-align: left;
background-color: #eaeaea;
}
a {
color: #f49800;
color: #ff8700;
text-decoration: underline;
}
Expand All @@ -205,14 +219,18 @@ protected function getStylesheet(): string
text-decoration: none;
}
code,
kbd,
pre,
samp {
font-family: SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
font-size: 1em;
}
pre {
font: 100%/1.3 "Courier New", Courier, monospace;
background-color: #ffffff;
overflow-x: auto;
color: #000000;
line-height: 0;
border-top: 1px solid #b9b9b9;
border-bottom: 1px solid #b9b9b9;
border: 1px solid rgba(0,0,0,0.125);
}
pre span {
Expand All @@ -233,7 +251,7 @@ protected function getStylesheet(): string
}
pre span.highlight {
background-color: #e7f2fe;
background-color: #cce5ff;
}
.break-long-words {
Expand All @@ -246,10 +264,11 @@ protected function getStylesheet(): string
}
.callout {
background-color: #fafafa;
padding: 1.5rem;
background-color: #fff;
margin-bottom: 2em;
box-shadow: 0 2px 1px rgba(0,0,0,.15);
border-left: 3px solid #8c8c8c;
margin: 2em 0;
padding: 1em;
}
.callout-title {
Expand All @@ -261,46 +280,52 @@ protected function getStylesheet(): string
}
.container {
max-width: 1024px;
max-width: 1140px;
margin: 0 auto;
padding: 0 15px;
padding: 0 30px;
}
.exception-page {
position: relative;
height: 100vh;
overflow-x: hidden;
overflow-y: scroll;
}
.exception-illustration {
width: 3em;
height: 3em;
float: left;
margin-right: 1em;
margin-right: 1rem;
}
.exception-illustration svg {
width: 100%;
}
.exception-illustration svg path {
fill: #f49800;
fill: #ff8700;
}
.exception-summary {
background: #000000;
color: #ffffff;
padding: 1.5em 0;
margin-bottom: 2em;
color: #fff;
padding: 1.5rem 0;
margin-bottom: 2rem;
}
.exception-summary h1 {
margin: 0;
}
.text-muted {
color: #8c8c8c;
opacity: 0.5;
}
.trace {
background-color: #fafafa;
margin-bottom: 2em;
border: 1px solid #b9b9b9;
box-shadow: rgba(0, 0, 0, 0.2) 0px 1px 1px;
background-color: #fff;
margin-bottom: 2rem;
box-shadow: 0 2px 1px rgba(0,0,0,.15);
}
.trace-arguments {
Expand All @@ -311,35 +336,44 @@ protected function getStylesheet(): string
}
.trace-call {
margin-bottom: 1em;
margin-bottom: 1rem;
}
.trace-class {
margin: 0;
}
.trace-file pre {
margin-top: 1em;
margin-top: 1.5rem;
margin-bottom: 0;
}
.trace-head {
background-color: #eaeaea;
padding: 1em;
color: #721c24;
background-color: #f8d7da;
padding: 1.5rem;
}
.trace-message {
margin-bottom: 0;
}
.trace-step {
padding: 1em;
padding: 1.5rem;
border-bottom: 1px solid #b9b9b9;
}
.trace-step > *:first-child {
margin-top: 0;
}
.trace-step > *:last-child {
margin-bottom: 0;
}
.trace-step:nth-child(even)
{
background-color: #ffffff;
background-color: #fafafa;
}
.trace-step:last-child {
Expand Down

0 comments on commit d66fd78

Please sign in to comment.