exception handling

Jp Calderone exarkun at flashmail.com
Mon May 8 18:36:58 EDT 2000


 Is there any way to catch *all* exceptions raised in a 
try/except block *and* get a reference to the exception
that was raised?  I basically just need to print out the
exception, as the interpreter does when an unhandled
exception is raised, but with extra formatting and such.
I've tried the sys.exc_info() function, but it always
seems to return (None, None, None) - even when it is
being called in an except block, where it obviously
*should* have info on an exception.

 Thanks in advance,
  Jp



-- 
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS dpu>-- s+: a--- C++++ UL++++ P+ L+++ E---- W++ N++ o+ K- w--- 
O-- M- V- PS+++ PE- Y+ PGP t+ 5+ X++ R+ tv+ b++ DI++ D--- 
G e* h! !r y-- 
------END GEEK CODE BLOCK------
--
 6:34pm up 5 days, 23:02, 6 users, load average: 0.07, 0.09, 0.03



More information about the Python-list mailing list