homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paulb
Recipients paulb
Date 2012年08月06日.09:53:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1344246838.35.0.931540837367.issue15565@psf.upfronthosting.co.za>
In-reply-to
Content
In Python 2.6, pdb doesn't show exception strings properly:
#somecode.py
import pdb
pdb.set_trace()
raise Exception('This is a message that contains a lot of characters and is very long indeed.')
#terminal
> somecode.py
-> raise Exception('This is a message that contains a lot of characters and is very long indeed.')
(Pdb) n
Exception: Exceptio...ndeed.',)
The pdb code assumes that sys.exc_info()[1] is a string. In fact it's an Exception instance.
The solution I found was to use str()
#pdb.py line 186
print >>self.stdout, exc_type_name + ':', _saferepr(str(exc_value))
This may have been fixed already but I couldn't find any reference to it.
History
Date User Action Args
2012年08月06日 09:53:58paulbsetrecipients: + paulb
2012年08月06日 09:53:58paulbsetmessageid: <1344246838.35.0.931540837367.issue15565@psf.upfronthosting.co.za>
2012年08月06日 09:53:57paulblinkissue15565 messages
2012年08月06日 09:53:57paulbcreate

AltStyle によって変換されたページ (->オリジナル) /