From: Andrew M. Kuchling Date: Thu, 27 Apr 2006 12:48:56 +0000 (+0000) Subject: Mention xmlrpclib.Error base class; import Error in example X-Git-Tag: v2.4.4c1~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=781d66034a50dfa7f11b7ea4b60811da1e0efa92;p=thirdparty%2FPython%2Fcpython.git Mention xmlrpclib.Error base class; import Error in example --- diff --git a/Doc/lib/libxmlrpclib.tex b/Doc/lib/libxmlrpclib.tex index fed685f8e5e7..1303d67ac235 100644 --- a/Doc/lib/libxmlrpclib.tex +++ b/Doc/lib/libxmlrpclib.tex @@ -71,9 +71,11 @@ Python type): This is the full set of data types supported by XML-RPC. Method calls may also raise a special \exception{Fault} instance, used to signal XML-RPC server errors, or \exception{ProtocolError} used to signal an -error in the HTTP/HTTPS transport layer. Note that even though starting -with Python 2.2 you can subclass builtin types, the xmlrpclib module -currently does not marshal instances of such subclasses. +error in the HTTP/HTTPS transport layer. Both \exception{Fault} and +\exception{ProtocolError} derive from a base class called +\exception{Error}. Note that even though starting with Python 2.2 you +can subclass builtin types, the xmlrpclib module currently does not +marshal instances of such subclasses. When passing strings, characters special to XML such as \samp{<}, \samp{>}, and \samp{\&} will be automatically escaped. However, it's @@ -318,7 +320,7 @@ function will raise a \exception{Fault} exception. \begin{verbatim} # simple test program (from the XML-RPC specification) -from xmlrpclib import ServerProxy +from xmlrpclib import ServerProxy, Error # server = ServerProxy("http://localhost:8000") # local server server = ServerProxy("http://betty.userland.com")