import traceback


def get_full_string_of_exception(e):
    tb = e.__traceback__
    tb_lines = traceback.format_tb(tb)
    tb_str=""
    for line in tb_lines:
        tb_str += line + "\n"

    full_string = "{}\n{}".format(str(e), tb_str)

    return full_string


0 Comments

Leave a Reply

Your email address will not be published.