traceback.py
· 164 B · Python
Raw
import traceback
traceback.print_exc() # pour afficher la pile d'erreur sur la sortie standard
chaine = tracebak.format_exc() # pour recupérer un str
print(chaine)
| 1 | import traceback |
| 2 | traceback.print_exc() # pour afficher la pile d'erreur sur la sortie standard |
| 3 | chaine = tracebak.format_exc() # pour recupérer un str |
| 4 | print(chaine) |