[Tutor] Script performance: Filtering email

Sheila King sheila@thinkspot.net
Tue, 16 Jan 2001 21:35:33 -0800


On Tue, 16 Jan 2001 10:51:54 +0100, Remco Gerlich <scarblac@pino.selwerd.nl>
wrote about Re: [Tutor] Script performance: Filtering email:

:
:If the connection fails for some reason or other, an exception will
:be raised.
:
:Maybe you should wrap the whole thing in a try/except to log whatever
:goes wrong, like
:
:try:
:   (the body of your script)
:except:
:   import sys
:   f=open("somelogfile","w")
:   print >> f, sys.exc_info()
:   f.close()
:   
:   raise # Re-raise the exception so that the program doesn't quit silently
:   
:If that log file fills up, you know where to look. I can't really
:say more from here.

OK, I'm definitely throwing exceptions. Here is the log file, after just a few
minutes:

-------------------------------------------------------------

(<class exceptions.NameError at 0x816f5e4>, <exceptions.NameError instance at
0x81d2b24>, <traceback object at 0x81d2af8>)


*****My Error Separator line****


(<class exceptions.NameError at 0x816f5e4>, <exceptions.NameError instance at
0x81d2b24>, <traceback object at 0x81d2af8>)


*****My Error Separator line****


(<class exceptions.NameError at 0x816f5e4>, <exceptions.NameError instance at
0x81d2b24>, <traceback object at 0x81d2af8>)


*****My Error Separator line****


(<class exceptions.NameError at 0x816f5e4>, <exceptions.NameError instance at
0x81d2b24>, <traceback object at 0x81d2af8>)


*****My Error Separator line****

-------------------------------------------------------------

I don't see how to track this one down. Can someone give me a tip? Something
to point me in the correct direction?



--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/