From: Andrew Tridgell Date: Fri, 27 May 2005 04:37:51 +0000 (+0000) Subject: r7005: added a esp page to demonstrate exception handling X-Git-Tag: samba-4.0.0alpha6~801^3~10888 X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fsamba-autobuild%2F.git;a=commitdiff_plain;h=96df7fcbf9dc2ba8d1da48a29baf35262d62287d;hp=2cdce8d1aac1e2bf96016a7ccd51071c0e8f4767 r7005: added a esp page to demonstrate exception handling (This used to be commit 96c15646d2f29dd2839a2bab4b9e57bddfd2cee1) --- diff --git a/swat/esptest/exception.esp b/swat/esptest/exception.esp new file mode 100644 index 00000000000..d569fbe7760 --- /dev/null +++ b/swat/esptest/exception.esp @@ -0,0 +1,37 @@ + + +Samba4 ESP test + + +

Samba4 exception test

+ +
+ + +
+
+ +<% +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!
\n"); + TestFunction("foo"); + } else { + write("no exception
\n"); + TestFunction("foo", "bar"); + } +} +%> + +and here is some filler text ... + + diff --git a/swat/esptest/index.esp b/swat/esptest/index.esp index e85937e4bf7..7a5952e9552 100644 --- a/swat/esptest/index.esp +++ b/swat/esptest/index.esp @@ -1,5 +1,6 @@ <% - var tests = new Array("formtest", "showvars", "include", "session", "loadparm"); + var tests = new Array("formtest", "showvars", "include", + "session", "loadparm", "exception"); %>