[Eric] Re: Question about "Exception Filter"
Detlev Offenbach
detlev at die-offenbachs.de
Wed May 28 16:57:29 BST 2008
On Dienstag, 27. Mai 2008, Mikhail wrote:
> Detlev Offenbach <detlev at ...> writes:
> > On Donnerstag, 8. Mai 2008, Mikhail wrote:
> > > Hi,
> > >
> > > I've a question about "Exceptions Filter" dialog. The input line at the
> > > bottom of the dialog has a tool tip "Enter an exception type that shall
> > > be highlighted". What does the "highlighted" mean? Filtered out, i.e.
> > > ignored?
> >
> > According to the "What's this" help, highlighted means, that only those
> > exceptions will be reported, that appear in the list. If the list is
> > empty, all exceptions will be reported.
>
> Ok then, my guess was right but unfortunately it doesn't work for me for
> some reason. The following code illustrates the problem
>
> class Myerror(Exception): pass
> def test(x):
> d = {1:'1'}
> try:
> return d[x]
> except Keyerror:
> raise MyError, 'not found'
>
> for i in range(10):
> y = test(i)
> print 'DONE'
>
> I tried to insert both KeyError and MyError in this "Exception Filter"
> dialog but Eric continues to stop on these exceptions. I've tried to do
> this before starting debugging session and during one with the same result.
I tried your example (the second one posted) and eric behaves as expected.
Entering just one of the exceptions, eric show the "Break here?" dialog just
on this exception. Entering both, shows the dialog on both. Entering none
shows them on both as well and would show it on every other exception.
>
> Another problem in this example - if I put a breakpoint on the last line
> (with print statement) and select "Start"->"Debug script" it stops on the
> "return d[x]" line then after I click on "No" button - on the "raise
> Myerror ..." line and then finally shows a message "The program being
> debugged has terminated unexpectedly." ignoring the breakpoint.
It works overe here.
>
> I've tried this with and without the "Report exceptions" checked on the
> "Debug Script" dialog.
>
> Is there workaround for this feature? Otherwise it makes debugging almost
> unusable in some cases.
>
> Regards,
> Mikhail
>
>
> _______________________________________________
> Eric mailing list
> Eric at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/eric
Regards,
Detlev
--
Detlev Offenbach
detlev at die-offenbachs.de
More information about the Eric
mailing list