Passgen script (normal user part)
[bpt/portal.git] / passgen / exn.mlt
diff --git a/passgen/exn.mlt b/passgen/exn.mlt
new file mode 100644 (file)
index 0000000..8c13844
--- /dev/null
@@ -0,0 +1,28 @@
+<html><head>
+<title>Hcoop Passgen: Exception</title>
+</head><body>
+
+<h1>Exception</h1>
+
+<% switch Web.getExn () of
+     Fail msg => %>
+<b>Fail</b>: <% Web.htmlNl msg %>
+<% | OS.SysErr (name, NONE) => %>
+<b>System error</b>: <% Web.html name %>
+<% | OS.SysErr (name, SOME syserr) => %>
+<b>System error</b>: <% Web.html name %>: <% Web.html (OS.errorName syserr) %>: <% Web.htmlNl (OS.errorMsg syserr) %>
+<% | IO.Io {name, function, ...} => %>
+<b>IO error</b>: <% Web.html name %> for <% Web.html function %><br>
+<% | PassGen.C.Sql msg => %>
+<b>SQL</b>: <% Web.htmlNl msg %>
+<% | Web.Format s => %>
+<b>Format</b>: <% Web.htmlNl s %>
+
+<% | ex => %>
+<b>Unknown exception kind.</b> Backtrace:
+<% foreach s in SMLofNJ.exnHistory ex do %>
+<li> <% Web.html s %></li>
+<% end
+end %>
+
+</body></html>