[wingide-users] Re: Exceptions in Wing 2.0.2

Wing IDE Support support at wingware.com
Mon Mar 14 12:25:25 EST 2005

On Mon, 14 Mar 2005, Fredrik Juhlin wrote:
> It seems like the latest version of Wing is less successful in
> evaluating when to stop at an exception and when not to.
> Running my (rather large) project it stops on exceptions that are in
> try-except blocks, either in the same method or in a calling method.
> I know that Wing has a hard time dealing with exceptions caused by e.g.
> C code, but so far I've seen it stop on an assert (never mind how stupid
> it is to try-except an assert :) as well as a piece of code that looks
> like this:
> for x in y:
>   try:
>     if x != lastX:
>       ...
>   except NameError:
>     # lastX didn't exist yet
>     pass
>   lastX = x
> ... where it would stop on the x != lastX line, and the Exceptions tab
> would correctly inform me that it stopped on a NameError.
> I tried recreating it with just the above code but failed, so I can't
> really give any useful insights as to what provokes the bug.

Actually, Wing 2.0.2 will now always stop on certain types of
exceptions by default -- all those, we felt were likely always
programming errors (AssertionError, NameError,
UnboundLocalError).  All except the case where the exception is
explicitly handled by type in the same frame (as in your test
case) because then clearly it's an expected exception.  

If you're using NameError for normal exceptions, you can turn
this off in the Debugger / Exceptions / Always Report preferences

I'm fairly sure NameError indicates a programming error in
almost all cases, but if it turns out we're wrong about that
we'll have to remove it from the default always-stop list.

Sorry for the confusion.

Stephan Deibel

Wing IDE for Python
Advancing Software Development


More information about the wingide-users mailing list