Source code for conditions.exceptions
# coding: utf-8
[docs]class InvokeRestart(Exception):
def __init__(self, callback, *args, **kwargs):
"""This exception helps to unwind stack and to call
given callback on the frame where it was bound.
"""
self.callback = lambda: callback(*args, **kwargs)