/
error.template
66 lines (60 loc) · 1.37 KB
/
error.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
% my ($exception, $request) = @_;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=yes">
<title>Error in Bailador</title>
<style>
td {
border: solid 1px;
}
#exception {
background-color: #f4b541;
}
</style>
</head>
<body>
<h1>An error has occured</h1>
In the future this will be a nice error page. For now we try to make it at least informative.
You see this detailed error message because Bailador is in debug-mode. In production mode a 500 error will be sent to the client that you can customize.
<h2>Exception</h2>
<pre id="exception">
<%= $exception.gist %>
</pre>
<h2>Request</h2>
<table>
% for <
% content_length
% content_type
% method
% path
% port
% protocol
% referer
% remote_host
% request_uri
% scheme
% script_name
% secure
% server
% uri
% user
% user_agent
% > -> $f {
<tr><td><%= $f %></td><td><%= $request."$f"() // '' %></td></tr>
% }
</table>
<h2>Perl</h2>
<table>
<tr><td>$*PROGRAM-NAME</td><td><%= $*PROGRAM-NAME %></td></tr>
<tr><td>$*EXECUTABLE</td><td><%= $*EXECUTABLE %></td></tr>
</table>
<h2>ENV</h2>
<table>
% for %*ENV -> $p {
<tr><td><%= $p.key %></td><td><%= $p.value %></td></tr>
% }
</table>
</body>
</html>