

def get_ex_tb(message, ex_class=None):
    ex_class = (ex_class if ex_class else ExceptionA)
    try:
        raise ex_class(message)
    except Exception as e:
        return (e, sys.exc_info()[2])

dataset/ETHPy150Open dimagi/commcare-hq/corehq/ex-submodules/pillow_retry/tests.py get_ex_tb/original