% my $e = delete $self->stash->{'exception'};
<!doctype html><html>
<head>
<title>Exception</title>
<style type="text/css">
body {
font: 0.9em Verdana, "Bitstream Vera Sans", sans-serif;
}
.snippet {
font: 115% Monaco, "Courier New", monospace;
}
</style>
</head>
<body>
<% if ($self->app->mode eq 'development') { %>
<div>
This page was generated from the template
"templates/exception.html.ep".
</div>
<div class="snippet"><pre><%= $e->message %></pre></div>
<div>
<% for my $line (@{$e->lines_before}) { %>
<div class="snippet">
<%= $line->[0] %>: <%= $line->[1] %>
</div>
<% } %>
<% if ($e->line->[0]) { %>
<div class="snippet">
<b><%= $e->line->[0] %>: <%= $e->line->[1] %></b>
</div>
<% } %>
<% for my $line (@{$e->lines_after}) { %>
<div class="snippet">
<%= $line->[0] %>: <%= $line->[1] %>
</div>
<% } %>
</div>
<div class="snippet"><pre><%= dumper $self->stash %></pre></div>
<% } else { %>
<div>Page temporarily unavailable, please come back later.</div>
<% } %>
</body>
</html>