From d895b852a6e160496ffc760d46d3719a3d62ff86 Mon Sep 17 00:00:00 2001 From: Nathan Kinkade Date: Sun, 3 Feb 2008 23:23:24 +0000 Subject: Initial checkin of nutridb.org and basic subversion directory structure --- lib/xajax_0.2.4/tests/errorHandlingTest.php | 40 +++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 lib/xajax_0.2.4/tests/errorHandlingTest.php (limited to 'lib/xajax_0.2.4/tests/errorHandlingTest.php') diff --git a/lib/xajax_0.2.4/tests/errorHandlingTest.php b/lib/xajax_0.2.4/tests/errorHandlingTest.php new file mode 100644 index 0000000..ec8b002 --- /dev/null +++ b/lib/xajax_0.2.4/tests/errorHandlingTest.php @@ -0,0 +1,40 @@ +debugOn(); +$xajax->errorHandlerOn(); +$xajax->setLogFile("xajax_error_log.log"); + +function myErrorRiddenFunction() +{ + $value = $silly['nuts']; + $objResponse = new xajaxResponse(); + $objResponse->addAlert("Bad array value: $value"); + include("file_doesnt_exist.php"); + return $objResponse->getXML(); +} + +$xajax->registerFunction("myErrorRiddenFunction"); +$xajax->processRequests(); +?> + + + +Error Handling Test | xajax Tests +printJavascript("../") ?> + + + +

xajax Tests

+

Error Handling Test

+ +
+

+
+ +
+ + + \ No newline at end of file -- cgit v1.2.3