Surprisingly, this doesn't come as a standard function in the Exception class.
import traceback
try:
raise Exception("print exception!")
except:
print traceback.format_exc() Short and simple, so good!
Mainly notes to future-Twig (and for anyone else who may find them useful)
Surprisingly, this doesn't come as a standard function in the Exception class.
import traceback
try:
raise Exception("print exception!")
except:
print traceback.format_exc() Short and simple, so good!