summaryrefslogtreecommitdiff
path: root/swat/esptest/exception.esp
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-05-27 04:37:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:05 -0500
commit96df7fcbf9dc2ba8d1da48a29baf35262d62287d (patch)
tree9a7d40ba5b46d1275443b4c5e93c3a854dc04d4e /swat/esptest/exception.esp
parent2cdce8d1aac1e2bf96016a7ccd51071c0e8f4767 (diff)
downloadsamba-96df7fcbf9dc2ba8d1da48a29baf35262d62287d.tar.gz
samba-96df7fcbf9dc2ba8d1da48a29baf35262d62287d.tar.bz2
samba-96df7fcbf9dc2ba8d1da48a29baf35262d62287d.zip
r7005: added a esp page to demonstrate exception handling
(This used to be commit 96c15646d2f29dd2839a2bab4b9e57bddfd2cee1)
Diffstat (limited to 'swat/esptest/exception.esp')
-rw-r--r--swat/esptest/exception.esp37
1 files changed, 37 insertions, 0 deletions
diff --git a/swat/esptest/exception.esp b/swat/esptest/exception.esp
new file mode 100644
index 0000000000..d569fbe776
--- /dev/null
+++ b/swat/esptest/exception.esp
@@ -0,0 +1,37 @@
+<HTML>
+<TITLE>
+Samba4 ESP test
+</TITLE>
+<BODY>
+<h1>Samba4 exception test</h1>
+
+<form name="ExceptionTest" method="POST" action="@@request['SCRIPT_NAME']">
+ <input name="submit" type="submit" value="Generate Exception">
+ <input name="submit" type="submit" value="No Exception">
+ <input name="submit" type="submit" value="Cancel"><br>
+</form>
+
+<%
+if (request['REQUEST_METHOD'] == "POST") {
+ /* if they cancelled then take them back to the list of tests */
+ if (form['submit'] == "Cancel") {
+ redirect("index.esp");
+ }
+
+ function TestFunction(arg1, arg2) {
+ return "OK";
+ }
+
+ if (form['submit'] == "Generate Exception") {
+ write("I expect you to die Mr Bond!<br>\n");
+ TestFunction("foo");
+ } else {
+ write("no exception<br>\n");
+ TestFunction("foo", "bar");
+ }
+}
+%>
+
+and here is some filler text ...
+</BODY>
+</HTML>