View/Edit #1874:web_error

Switch to edit mode.

Name(s): web_error
1:  "Usage: this:web_error(e)"
2:  ""
3:  "this is an html4 traceback error handler. Send it an except error."
4:  e = args[1]
5:  r = h = {}
6:  this.owner:tell("Error reporter! this:web_error(error): ", $string_utils:print(e))
7:  " build a head "
8:  h = {@this:html4_header()}
9:  h = {@h, "<HTML>"}
10: h = {@h, "<HEAD>"}
11: h = {@h, "<TITLE>Traceback!</TITLE>"}
12: h = {@h, @this:hstyle({"BODY", "background-color: white; color: black"}, {"A:link", "color: cyan"}, {"A:visited", "color: red"}, {"A:active", "color: fuchsia"}, {"EM.err1", "color: rgb(20, 20, 255);text-align: left;font-style: bold;font-size: 14pt"}, {"EM.err2", "color: rgb(255, 20, 20);text-align: left;font-style: bold;font-size: 11pt"})}
13: h = {@h, "</HEAD>"}
14: h = {@h, "<BODY>"}
15: r = {@h, "<big> Traceback! (MOO Error) </big><hr>"}
16: tb = e[4]
17: r = {@r, "<strong>     ", @{tostr(tb[1][1]) + ":" + tb[1][2] + ", line " + tostr(tb[1][6]) + " " + e[2] + "<br>"}}
18: for fr in (tb[2..$])
19:   r = {@r, @{"              ...called from " + tostr(fr[1]) + ":" + fr[2] + ", line " + tostr(fr[6]) + "<br>"}}
20: endfor
21: r = {@r, "</strong>"}
22: r = {@r, "<p><code>@list " + tostr(tb[1][1]) + ":" + tb[1][2] + " " + tostr(tb[1][6]) + "<br><br>"}
23: r = {@r, "   " + tostr(tb[1][6]) + ": " + verb_code(tb[1][1], tb[1][2])[tb[1][6]] + "</code><br><br>"}
24: "r = {@r, @this:errors_table()};"
25: r = {@r, "</body></html>"}
26: return r
27: "Compiled on Thu Feb 28 18:28:32 2002 EST by Wingy (#1163)"
28: "Last modified by Wingy (#9223) on Mon Mar 18 09:53:06 2002 MST."

Verb arguments: this none this
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Wingy (#9223)

You are not logged in.

[home | help | who | search | setup | code]