[Xotcl] Catching errors in calls to "next"

MichaelL at frogware.com MichaelL at frogware.com
Mon Nov 15 18:51:32 CET 2004


Ok, I've found a temporary workaround using 

        TestB create ::b -x 5

rather than 

        TestB ::b -x 5

Still, why doesn't the second approach work?

xotcl-bounces at alice.wu-wien.ac.at wrote on 11/15/2004 12:41:25 PM:

> I'm using XOTcl 1.3.1. (I haven't upgraded to the 1.3.3 beta yet.)
> 
> I have a filter that does work before and after calls to "next". I'd 
like 
> to make sure that the "after" code always gets called, so I'm using 
> "catch" around my call to "next," a bit like this:
> 
>         # do something before
> 
>         set err [catch {next} result]
> 
>         # do something after
> 
> The problem is that in specific circumstances (when objects are 
> constructed) the fact that "next" is called within "catch" is screwing 
> things up. (The error I'm getting is "5", which is defined in XOTcl as 
> "XOTCL_UNKNOWN".)
> 
> I can see why "catch" would get in the way, but so far I haven't found a 

> way around the problem. Does anyone have any ideas?

<snip>


More information about the Xotcl mailing list