]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Mention xmlrpclib.Error base class; import Error in example
authorAndrew M. Kuchling <amk@amk.ca>
Thu, 27 Apr 2006 12:48:56 +0000 (12:48 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Thu, 27 Apr 2006 12:48:56 +0000 (12:48 +0000)
Doc/lib/libxmlrpclib.tex

index fed685f8e5e7032767438fb45bba23f8d3472fc1..1303d67ac2356641239e090194dcacc330dd66ce 100644 (file)
@@ -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")