From 781d66034a50dfa7f11b7ea4b60811da1e0efa92 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Thu, 27 Apr 2006 12:48:56 +0000 Subject: [PATCH] Mention xmlrpclib.Error base class; import Error in example --- Doc/lib/libxmlrpclib.tex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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") -- 2.47.3