Skip to content

Commit 1544509

Browse files
authored
Proposal - better handle exceptions on debug page (#1126)
1 parent faeff03 commit 1544509

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

lib/plug/templates/debugger.html.eex

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,7 @@
127127
}
128128
}
129129

130-
.exception-info > .struct,
131-
.exception-info > .title,
132-
.exception-info > .detail {
130+
.exception-info > .struct {
133131
margin: 0;
134132
padding: 0;
135133
}
@@ -146,28 +144,8 @@
146144
font-weight: 400;
147145
}
148146

149-
.exception-info > .title {
150-
font-size: <%= :math.pow(1.2, 4) %>em;
151-
line-height: 1.4;
152-
font-weight: 300;
153-
color: <%= @style.primary %>;
154-
}
155-
156-
@media (max-width: 768px) {
157-
.exception-info > .title {
158-
font-size: <%= :math.pow(1.15, 4) %>em;
159-
}
160-
}
161-
162-
@media (max-width: 480px) {
163-
.exception-info > .title {
164-
font-size: <%= :math.pow(1.1, 4) %>em;
165-
}
166-
}
167-
168-
.exception-info > .detail {
169-
margin-top: 1.3em;
170-
white-space: pre-wrap;
147+
.exception-info > code {
148+
line-height: 1.5;
171149
}
172150

173151
/*
@@ -707,16 +685,12 @@
707685
<% end %>
708686

709687
<header class="exception-info">
710-
<% [headline | details] = String.split(@message, "\n\n") %>
711688
<h5 class="struct">
712689
<%= h @title %>
713690
<small>at <%= h method(@conn) %></small>
714691
<small class="path"><%= h @conn.request_path %></small>
715692
</h5>
716-
<h1 class="title"><%= h headline %></h1>
717-
<%= for detail <- details do %>
718-
<p class="detail"><%= h detail %></p>
719-
<% end %>
693+
<code><pre><%= h @message %></pre></code>
720694
</header>
721695

722696
<%= for %{label: label, encoded_handler: encoded_handler} <- @actions do %>

0 commit comments

Comments
 (0)