traceback module in python code example
Example: traceback python
import traceback
try:
#Error prone code
x=1/0
except Exception as e:
print(e)
traceback.print_exc()
import traceback
try:
#Error prone code
x=1/0
except Exception as e:
print(e)
traceback.print_exc()