svn commit: samba r7005 - in branches/SAMBA_4_0/swat/esptest: .
tridge at samba.org
tridge at samba.org
Fri May 27 04:37:52 GMT 2005
Author: tridge
Date: 2005-05-27 04:37:51 +0000 (Fri, 27 May 2005)
New Revision: 7005
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7005
Log:
added a esp page to demonstrate exception handling
Added:
branches/SAMBA_4_0/swat/esptest/exception.esp
Modified:
branches/SAMBA_4_0/swat/esptest/index.esp
Changeset:
Added: branches/SAMBA_4_0/swat/esptest/exception.esp
===================================================================
--- branches/SAMBA_4_0/swat/esptest/exception.esp 2005-05-27 04:37:07 UTC (rev 7004)
+++ branches/SAMBA_4_0/swat/esptest/exception.esp 2005-05-27 04:37:51 UTC (rev 7005)
@@ -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>
Modified: branches/SAMBA_4_0/swat/esptest/index.esp
===================================================================
--- branches/SAMBA_4_0/swat/esptest/index.esp 2005-05-27 04:37:07 UTC (rev 7004)
+++ branches/SAMBA_4_0/swat/esptest/index.esp 2005-05-27 04:37:51 UTC (rev 7005)
@@ -1,5 +1,6 @@
<%
- var tests = new Array("formtest", "showvars", "include", "session", "loadparm");
+ var tests = new Array("formtest", "showvars", "include",
+ "session", "loadparm", "exception");
%>
<HTML>
More information about the samba-cvs
mailing list