Message159084
| Author |
r.david.murray |
| Recipients |
r.david.murray |
| Date |
2012年04月23日.21:22:51 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1335216172.17.0.173976069373.issue14655@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Suppose you have an exception object acquired from somewhere. The exception is no longer active on the stack. Now you want to format the exception like format_exception would (to log it, perhaps). To do this you apparently need to call:
format_exception(type(exc), exc, exc.__traceback__)
This seems redundant, so it would be nice to have a simpler call. Too bad the name format_exception is already taken. But, leaving that aside, the above is not documented in the traceback module. The last example shows the (type(exc), exc) call form for format_exception_only, but that's as close as it gets. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年04月23日 21:22:52 | r.david.murray | set | recipients:
+ r.david.murray |
| 2012年04月23日 21:22:52 | r.david.murray | set | messageid: <1335216172.17.0.173976069373.issue14655@psf.upfronthosting.co.za> |
| 2012年04月23日 21:22:51 | r.david.murray | link | issue14655 messages |
| 2012年04月23日 21:22:51 | r.david.murray | create |
|