improve error handling

pull/9/head
Matthew Butterick 11 years ago
parent afc06e463e
commit 9af3efa904

@ -0,0 +1,35 @@
<!-- saved from url=(0037)http://localhost:8088/how-to-use.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Servlet Error</title><link rel="stylesheet" href="http://localhost:8088/error.css"><style type="text/css"></style></head><body><div class="section"><div class="title">Exception</div><p>The application raised an exception with the message:</p><pre>link: contract violation
expected: stringish?
given: '(img ((src "images/tfl-book-cover.gif")))
in: the 1st argument of
(-&gt;*
(stringish?)
(stringish? #:class stringish?)
tagged-xexpr?)
contract from: (function link)
blaming: /Users/mb/git/bpt/pollen-require/bpt-elements.rkt
at: /Users/mb/git/bpt/pollen-require/bpt-elements.rkt:44.18</pre><p></p><p>Stack trace:</p><pre>raise-blame-error16 at:
line 143, column 0, in file /Users/mb/git/racket/racket/collects/racket/contract/private/blame.rkt
&lt;unknown procedure&gt; at:
line 1570, column 30, in file /Users/mb/git/racket/racket/collects/racket/private/kw.rkt
[running body] at:
line #f, column #f, in file (submod /Users/mb/git/bpt/how-to-pay-for-this-book.html.pd pollen-inner)
[traversing imports] at:
line #f, column #f, in file /Users/mb/git/bpt/how-to-pay-for-this-book.html.pd
find-in-main at:
&lt;unknown location&gt;
with-output-to-string at:
line 125, column 0, in file /Users/mb/git/racket/racket/collects/racket/port.rkt
core112 at:
&lt;unknown location&gt;
loop at:
line 53, column 19, in file /Users/mb/git/racket/racket/collects/racket/private/map.rkt
route-default at:
line 206, column 0, in file /Users/mb/git/pollen/server-routes.rkt
&lt;unknown procedure&gt; at:
line 58, column 2, in file /Users/mb/git/racket/pkgs/web-server-pkgs/web-server-lib/web-server/dispatchers/dispatch-servlets.rkt
&lt;unknown procedure&gt; at:
line 112, column 8, in file /Users/mb/git/racket/pkgs/web-server-pkgs/web-server-lib/web-server/private/dispatch-server-unit.rkt
</pre><p></p></div></body></html>

@ -4,36 +4,34 @@
}
body {
padding: 1em;
font-family: "Source Code Pro";
padding: 1em;
}
.section {
border: 1px solid black;
}
.title {
background-color: #dfd;
div.title, p {
padding: 0.4em;
}
.section > p {
margin-left: 5px;
margin-right: 5px;
div.title {
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
}
.section > pre {
font-family: "Source Code Pro";
white-space: pre-wrap; /* css-3 */
background-color: #efe;
margin-left: 5px;
margin-right: 5px;
padding: 5px;
pre {
background: #ffe;
padding: 0.8em;
line-height: 1.5;
font-size: 80%;
font-family: "Source Code Pro";
white-space: pre-wrap;
overflow: scroll;
max-height: 240px;
}
.error {
color: red;
font-size: large;
font-weight: bolder;
color: red;
font-size: large;
}

@ -9,6 +9,7 @@ body {
}
div#pollen-logo {
display: none;
position: fixed;
right: 0;
bottom: 0;

Loading…
Cancel
Save