import traceback


def exception_to_string(e: Exception) -> str:
    """ Convert exception to printable string """
    stack = traceback.extract_stack()[:-3] + traceback.extract_tb(e.__traceback__)
    pretty_out = traceback.format_list(stack)
    return f"{pretty_out}\n {e.__class__} {e}"