# HG changeset patch # User paulb # Date 1114893843 0 # Node ID dc3782d8019d3a2800fa35e44f80de9bbecc17ed # Parent 0643717492e2527e1bda1fea0f9c004ccc0033d7 [project @ 2005-04-30 20:44:03 by paulb] Added information about handle_errors. diff -r 0643717492e2 -r dc3782d8019d docs/writing-adapters.html --- a/docs/writing-adapters.html Sat Apr 30 20:31:51 2005 +0000 +++ b/docs/writing-adapters.html Sat Apr 30 20:44:03 2005 +0000 @@ -8,22 +8,29 @@
Depending on how "simple" the adapter code is allowed to be for a +
Depending on how "simple" the +adapter code is allowed to be for a given -server environment (see the table for a +server environment (see the table +for a summary), you will either need to write a small piece of code which initialises and deploys your application, or to produce a more complicated piece of code which satisfies some more demanding server requirements.
-When deploying an application, it is possible to use a one-shot +
When deploying an application,
+it is possible to use a one-shot
deployment
function for BaseHTTPRequestServer, CGI, Twisted and WSGI. The
-deploy
function is called as follows:
deploy
+function is called as follows:
deploy(resource)-
deploy(resource, authenticator) # where authenticators are used
For some frameworks, an address may be specified:
+For some frameworks, an address +may be specified:
deploy(resource, address=(host_string, port_integer))-
deploy(resource, authenticator, address=(host_string, port_integer))
Here is a summary of which frameworks require address information:
+Here is a summary of which +frameworks require address information:
Twisted | -Supported (host_string is ignored) |
+ Supported (host_string
+is ignored) |
WSGI | @@ -48,11 +56,26 @@
The remaining frameworks (Java Servlet, mod_python, Webware and +
Sometimes, when resources throw unhandled exceptions when processing
+requests, it is desirable to see the details of the exceptions either
+in the Web browser or in the console from which the application was
+started. For such purposes, a parameter to the deploy
+function can be used:
deploy(resource, handle_errors=0)+
The handle_errors
parameter, if specified with a
+false value, will not supress unhandled exceptions with an "internal
+server error" response, but will instead provide the underlying server
+environment's report of such exceptions.
The remaining frameworks (Java
+Servlet,
+mod_python, Webware and
Zope) do
-not support the deploy
function due to the way
+not support the deploy
+function due to the way
applications are
typically integrated into the various server mechanisms. In these
cases, it
@@ -71,49 +94,62 @@
HttpServlet
handler
functionhandler
+functionInstallInWebKit
+ InstallInWebKit
functionurlParser
objecturlParser
+object
+ See "Deploying an Application" +
See "Deploying an +Application" for more details of the deployment process for each environment.