Skip to content

Commit 5ce2709

Browse files
committed
traceback: Add print_exception(), print_exc().
1 parent 2155124 commit 5ce2709

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

traceback/traceback.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
import sys
2+
13
def format_tb(tb, limit):
24
return ["traceback.format_tb() not implemented\n"]
35

46
def format_exception_only(type, value):
57
return [repr(value) + "\n"]
8+
9+
def print_exception(t, e, tb, limit=None, file=None, chain=True):
10+
if file is None:
11+
file = sys.stdout
12+
sys.print_exception(e, file)
13+
14+
def print_exc(limit=None, file=None, chain=True):
15+
print_exception(*sys.exc_info(), limit=limit, file=file, chain=chain)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy