Skip to content

Commit

Permalink
Proposal - better handle exceptions on debug page (#1126)
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrocp authored Jan 7, 2023
1 parent faeff03 commit 1544509
Showing 1 changed file with 4 additions and 30 deletions.
34 changes: 4 additions & 30 deletions lib/plug/templates/debugger.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@
}
}
.exception-info > .struct,
.exception-info > .title,
.exception-info > .detail {
.exception-info > .struct {
margin: 0;
padding: 0;
}
Expand All @@ -146,28 +144,8 @@
font-weight: 400;
}
.exception-info > .title {
font-size: <%= :math.pow(1.2, 4) %>em;
line-height: 1.4;
font-weight: 300;
color: <%= @style.primary %>;
}
@media (max-width: 768px) {
.exception-info > .title {
font-size: <%= :math.pow(1.15, 4) %>em;
}
}
@media (max-width: 480px) {
.exception-info > .title {
font-size: <%= :math.pow(1.1, 4) %>em;
}
}
.exception-info > .detail {
margin-top: 1.3em;
white-space: pre-wrap;
.exception-info > code {
line-height: 1.5;
}
/*
Expand Down Expand Up @@ -707,16 +685,12 @@
<% end %>

<header class="exception-info">
<% [headline | details] = String.split(@message, "\n\n") %>
<h5 class="struct">
<%= h @title %>
<small>at <%= h method(@conn) %></small>
<small class="path"><%= h @conn.request_path %></small>
</h5>
<h1 class="title"><%= h headline %></h1>
<%= for detail <- details do %>
<p class="detail"><%= h detail %></p>
<% end %>
<code><pre><%= h @message %></pre></code>
</header>

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

0 comments on commit 1544509

Please sign in to comment.