summary refs log tree commit diff stats
path: root/tests/deps/jester-#head/jester/private/errorpages.nim
blob: d1e69504008a9ce46c317a809334a771311078e0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Copyright (C) 2012 Dominik Picheta
# MIT License - Look at license.txt for details.
import htmlgen
proc error*(err, jesterVer: string): string =
   return html(head(title(err)),
               body(h1(err),
                    "<hr/>",
                    p("Jester " & jesterVer),
                    style = "text-align: center;"
               ),
               xmlns="http://www.w3.org/1999/xhtml")

proc routeException*(error: string, jesterVer: string): string =
  return html(head(title("Jester route exception")),
              body(
                h1("An error has occured in one of your routes."),
                p(b("Detail: "), error)
              ),
             xmlns="http://www.w3.org/1999/xhtml")