python print exception message and stack trace

54

python print exception message and stack trace -

# Basic syntax:
import traceback
try:
	your code here
except:
	print(traceback.format_exc())

Comments

Submit
0 Comments