Back to index

moin  1.9.0~rc2
Classes | Functions | Variables
MoinMoin.support.xappy.errors Namespace Reference

Classes

class  SearchEngineError
class  IndexerError
class  SearchError
class  XapianError

Functions

def _rebase_xapian_exceptions

Variables

string __docformat__ = "restructuredtext en"

Function Documentation

Add new base classes for all the xapian exceptions.

Definition at line 50 of file errors.py.

00050 
00051 def _rebase_xapian_exceptions():
00052     """Add new base classes for all the xapian exceptions.
00053 
00054     """
00055     import xapian
00056     for name in (
00057                  'AssertionError',
00058                  'DatabaseCorruptError',
00059                  'DatabaseCreateError',
00060                  'DatabaseError',
00061                  'DatabaseLockError',
00062                  'DatabaseModifiedError',
00063                  'DatabaseOpeningError',
00064                  'DatabaseVersionError',
00065                  'DocNotFoundError',
00066                  # We skip 'Error' because it inherits directly from exception
00067                  # and this causes problems with method resolution order.
00068                  # However, we probably don't need it anyway, because it's
00069                  # just a base class, and shouldn't ever actually be raised.
00070                  # Users can catch xappy.XapianError instead.
00071                  'FeatureUnavailableError',
00072                  'InternalError',
00073                  'InvalidArgumentError',
00074                  'InvalidOperationError',
00075                  'LogicError',
00076                  'NetworkError',
00077                  'NetworkTimeoutError',
00078                  'QueryParserError',
00079                  'RangeError',
00080                  'RuntimeError',
00081                  'UnimplementedError',
00082                  ):
00083         xapian_exception = getattr(xapian, name, None)
00084         if xapian_exception is not None:
00085             xapian_exception.__bases__ += (XapianError, )
00086             globals()['Xapian' + name] = xapian_exception
00087 
00088 _rebase_xapian_exceptions()

Variable Documentation

string MoinMoin.support.xappy.errors.__docformat__ = "restructuredtext en"

Definition at line 21 of file errors.py.