False exceptions?" (was Re: theme of the week: tools

Richie Hindle richie at entrian.com
Wed Sep 29 10:52:09 CEST 2004

> The "false exceptions" thing is a technical limitation of detecting
> whether or not an exception is going to lead to program termination at the
> moment it is raised

> Assuming an exception "is going to lead to program
> termination", trapping it at the point it's raised is only one instruction
> away from trapping at the point it causes termination (via sys.excepthook)

> You're assuming that it's all Python code up the stack until the final
> exception handling.  If there's an extension module in the way, you
> lose the ability to get at the information, and if that extension
> module decides to absorb the error, then there's no longer a chance to
> catch it.

I'll get my coat.

Richie Hindle
richie at entrian.com

More information about the Python-list mailing list