using pdb and catching exception

R. Bernstein rocky at panix.com
Thu Dec 6 18:07:00 EST 2007


Just checked to see how Ruby deals with this. Both languages allow one
to register a trace functon to catch "events" like call, line, return,
exception, etc. Ruby however register an event before the raise takes
place.

It might be cool for some good person to go through the process of
making a formal suggestion this get added, etc.  (unless a change like
this is already in the works).

"Diez B. Roggisch" <deets at nospam.web.de> writes:

> raise is a statement, not a function. So it won't work.
> 
> I do know that e.g. nose allows for dropping into pdb when a test
> fails. Maybe that works by catching the exception top-level, examining
> the stack-trace, setting a break-point, and restarting it.
> 
> Diez



More information about the Python-list mailing list