mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
#7539: use _saferepr() for printing exceptions from pdb.
This commit is contained in:
parent
c9a5ed04c1
commit
f833a56fd2
2 changed files with 29 additions and 2 deletions
|
@ -237,7 +237,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
|
|||
if type(t) == type(''):
|
||||
exc_type_name = t
|
||||
else: exc_type_name = t.__name__
|
||||
print >>self.stdout, '***', exc_type_name + ':', v
|
||||
print >>self.stdout, '***', exc_type_name + ':', _saferepr(v)
|
||||
|
||||
def precmd(self, line):
|
||||
"""Handle alias expansion and ';;' separator."""
|
||||
|
@ -753,7 +753,7 @@ class Pdb(bdb.Bdb, cmd.Cmd):
|
|||
if isinstance(t, str):
|
||||
exc_type_name = t
|
||||
else: exc_type_name = t.__name__
|
||||
print >>self.stdout, '***', exc_type_name + ':', repr(v)
|
||||
print >>self.stdout, '***', exc_type_name + ':', _saferepr(v)
|
||||
raise
|
||||
|
||||
def do_p(self, arg):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue