def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except redis.ConnectionError: msg = "ConnectionFailure caught" LOG.error(msg) raise storage_errors.ConnectionError(msg)
def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except exc.InvalidRequestError as ex: LOG.exception(ex) raise errors.ConnectionError()
def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except riak.RiakError as ex: LOG.exception(ex) raise errors.ConnectionError()
def wrapper(*args, **kwargs): try: return func(*args, **kwargs) except errors.ConnectionFailure as ex: LOG.exception(ex) raise storage_errors.ConnectionError()