Back to index

moin  1.9.0~rc2
Public Member Functions | Public Attributes
MoinMoin.support.werkzeug.exceptions.Aborter Class Reference

List of all members.

Public Member Functions

def __init__
def __call__

Public Attributes

 mapping

Detailed Description

When passed a dict of code -> exception items it can be used as
callable that raises exceptions.  If the first argument to the
callable is a integer it will be looked up in the mapping, if it's
a WSGI application it will be raised in a proxy exception.

The rest of the arguments are forwarded to the exception constructor.

Definition at line 417 of file exceptions.py.


Constructor & Destructor Documentation

def MoinMoin.support.werkzeug.exceptions.Aborter.__init__ (   self,
  mapping = None,
  extra = None 
)

Definition at line 427 of file exceptions.py.

00427 
00428     def __init__(self, mapping=None, extra=None):
00429         if mapping is None:
00430             mapping = default_exceptions
00431         self.mapping = dict(mapping)
00432         if extra is not None:
00433             self.mapping.update(extra)


Member Function Documentation

def MoinMoin.support.werkzeug.exceptions.Aborter.__call__ (   self,
  code,
  args,
  kwargs 
)

Definition at line 434 of file exceptions.py.

00434 
00435     def __call__(self, code, *args, **kwargs):
00436         if not args and not kwargs and not isinstance(code, (int, long)):
00437             raise _ProxyException(code)
00438         if code not in self.mapping:
00439             raise LookupError('no exception for %r' % code)
00440         raise self.mapping[code](*args, **kwargs)


Member Data Documentation

Definition at line 430 of file exceptions.py.


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