more informative 404 page for project server

pull/102/head
Matthew Butterick 9 years ago
parent 0dfe536350
commit 6b6b91dbc8

@ -253,6 +253,9 @@
;; 404 route
(define/contract (route-404 req)
(request? . -> . response?)
(define error-text (format "route-404: Can't find ~a" (->string (req->path req))))
(message error-text)
(response/xexpr+doctype `(html ,error-text)))
(define missing-path (->string (req->path req)))
(message (format "route-404: Can't find ~a" missing-path))
(response/xexpr+doctype
`(html
(head (title "404 error") (link ((href "/error.css") (rel "stylesheet"))))
(body (div ((class "section")) (div ((class "title")) "404 error") (p ,(format "~v" missing-path) " was not found"))))))

Loading…
Cancel
Save