class documentation

class safe_reraise(object):

View In Hierarchy

Reraise an exception after invoking some handler code.

Stores the existing exception info before invoking so that it is maintained across a potential coroutine context switch.

e.g.:

try:
    sess.commit()
except:
    with safe_reraise():
        sess.rollback()
Method __enter__ Undocumented
Method __exit__ Undocumented
Method __init__ Undocumented
Class Variable __slots__ Undocumented
Instance Variable ​_exc​_info Undocumented
Instance Variable warn​_only Undocumented
def __enter__(self):

Undocumented

def __exit__(self, type_, value, traceback):

Undocumented

def __init__(self, warn_only=False):

Undocumented

__slots__: tuple[str, ...] =

Undocumented

_exc_info =

Undocumented

warn_only =

Undocumented