Answers for "how to get traceback from exception in python"

3

python print traceback from exception

import traceback

try:
    do_stuff()
except Exception as err:
    print(err, traceback.format_exc())
Posted by: Guest on July-18-2021

Code answers related to "how to get traceback from exception in python"

Python Answers by Framework

Browse Popular Code Answers by Language