Back to index

python3.2  3.2.2
Public Member Functions | Private Attributes
xml.sax._exceptions.SAXException Class Reference
Inheritance diagram for xml.sax._exceptions.SAXException:
Inheritance graph
[legend]
Collaboration diagram for xml.sax._exceptions.SAXException:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def getMessage
def getException
def __str__
def __getitem__

Private Attributes

 _msg
 _exception

Detailed Description

Encapsulate an XML error or warning. This class can contain
basic error or warning information from either the XML parser or
the application: you can subclass it to provide additional
functionality, or to add localization. Note that although you will
receive a SAXException as the argument to the handlers in the
ErrorHandler interface, you are not actually required to throw
the exception; instead, you can simply read the information in
it.

Definition at line 9 of file _exceptions.py.


Constructor & Destructor Documentation

def xml.sax._exceptions.SAXException.__init__ (   self,
  msg,
  exception = None 
)
Encapsulate an XML error or warning. This class can contain
basic error or warning information from either the XML parser or
the application: you can subclass it to provide additional
functionality, or to add localization. Note that although you will
receive a SAXException as the argument to the handlers in the
ErrorHandler interface, you are not actually required to throw
the exception; instead, you can simply read the information in
it.
Creates an exception. The message is required, but the exception
is optional.

Definition at line 19 of file _exceptions.py.

00019 
00020     def __init__(self, msg, exception=None):
00021         """Creates an exception. The message is required, but the exception
00022         is optional."""
00023         self._msg = msg
00024         self._exception = exception
00025         Exception.__init__(self, msg)

Here is the caller graph for this function:


Member Function Documentation

Avoids weird error messages if someone does exception[ix] by
mistake, since Exception has __getitem__ defined.

Definition at line 38 of file _exceptions.py.

00038 
00039     def __getitem__(self, ix):
00040         """Avoids weird error messages if someone does exception[ix] by
00041         mistake, since Exception has __getitem__ defined."""
00042         raise AttributeError("__getitem__")
00043 
00044 
00045 # ===== SAXPARSEEXCEPTION =====

Reimplemented in xml.sax._exceptions.SAXParseException.

Definition at line 34 of file _exceptions.py.

00034 
00035     def __str__(self):
00036         "Create a string representation of the exception."
00037         return self._msg

Definition at line 30 of file _exceptions.py.

00030 
00031     def getException(self):
00032         "Return the embedded exception, or None if there was none."
00033         return self._exception

Definition at line 26 of file _exceptions.py.

00026 
00027     def getMessage(self):
00028         "Return a message for this exception."
00029         return self._msg


Member Data Documentation

Definition at line 23 of file _exceptions.py.

Definition at line 22 of file _exceptions.py.


The documentation for this class was generated from the following file: