python obtenha rastreamento de pilha
# Basic syntax:
import traceback
try:
your code here
except:
print(traceback.format_exc())
Charles-Alexandre Roy
# Basic syntax:
import traceback
try:
your code here
except:
print(traceback.format_exc())
import traceback
try:
raise TypeError("Oups!")
except Exception, err:
try:
raise TypeError("Again !?!")
except:
pass
traceback.print_exc()