![]() ![]() |
||
![]() |
![]() |
|
![]() |
[wingide-users] Index errors.Stephan R.A. Deibel sdeibel@archaeopteryx.comMon, 9 Apr 2001 23:41:02 -0400 (EDT)
Hi, This is very likely due to the way we try to detect unhandled exceptions in the debugger: At the point at which an exception is raised, it looks up the Python stack, disassembles byte code, and looks for matching except blocks. If it doesn't find one, it stops there. This algorithm cannot see into C extension modules so it sometimes thinks exceptions that are normally handled in your code are going to be unhandled. The solution is to check the "Don't show me this exception again" box in the Error List dialog and "Close and Continue". The ignore list is stored in your project file so you only have to do this once. In all the code we've encountered so far this usually only happens in 2-3 locations so is manageable with this approach. However, if you have a huge number of such exceptions that come up in different places, you can just set Exception Mode from the Run menu to Never Stop (this can also be set with the debug.exception-mode preference). Then, Wing will act exactly as if your code were run outside of the debugger. The drawback is that you're only notified of exceptions after the fact and can't see the state of your variables right where the exception happened. For more info see section 6.10 Managing Exceptions in the manual (actually the exact section number may vary depending on manual version). Let us know if that doesn't help... Thanks, - Stephan ------------------------------------------------------------------------ Archaeopteryx Software, Inc. Wing IDE for Python www.archaeopteryx.com Take Flight! On Tue, 10 Apr 2001, George Grisancich wrote: > Hi, > > I'm having problems with Wing, in that the following code snippet > produces a "Sequence Index out of range: error only when run from Wing. > > def __getitem__(self, index): > self.line = self.infile.readline() > if self.line: > return self.line > else: > raise IndexError > > > -- > ---------------------------------------------------------------------- > George Grisancich Information Technology Manager > Community Aid Abroad Oxfam Australia http://www.caa.org.au > tele: + 61 3 9289 9441 fax: +61 3 9419 5318 mobile: +61 419 283 833 > ---------------------------------------------------------------------- > > > _________________________________________________ > Archaeopteryx Software, Inc. > Wing IDE discussion list > http://archaeopteryx.com/mailman/listinfo/wingide-users >
Run by Mailman v 2.0.8 |
|
|
Copyright (c) 2000-2002, Archaeopteryx Software, Inc. Legal Statements | ||