def async_exception_raiser(exc):
        assert isinstance(exc, Exception), "Must derive from Exception"

        def method(*args, **kw):
            try:
                raise exc
            except:
                return defer.fail(Failure())
        return method
Create a method that takes any args, and always returns a Deferred
dataset/ETHPy150Open crossbario/autobahn-python/autobahn/wamp/test/test_user_handler_errors.py/async_exception_raiser