Package omero :: Package gateway :: Class assert_re
[hide private]
[frames] | no frames]

Class assert_re

source code


Function decorator to make sure that rendering engine is prepared before call. Is configurable by various options.

Instance Methods [hide private]
 
__init__(self, onPrepareFailureReturnNone=True, ignoreExceptions=None)
Initialises the decorator.
source code
 
__call__(ctx, f)
Tries to prepare rendering engine, then calls function and return the result.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, onPrepareFailureReturnNone=True, ignoreExceptions=None)
(Constructor)

source code 

Initialises the decorator.

:param onPrepareFailureReturnNone: Whether or not on a failure to prepare the rendering engine the decorator should return 'None' or allow the execution of the decorated function or method. Defaults to 'True'. :type onPrepareFailureReturnNone: Boolean :param ignoreExceptions: A set of exceptions thrown during the preparation of the rendering engine for whith the decorator should ignore and allow the execution of the decorated function or method. Defaults to 'None'. :type ignoreExceptions: Set

Overrides: object.__init__