View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] Catching errors in calls to "next"

From: <MichaelL_at_frogware.com>
Date: Mon, 15 Nov 2004 12:51:32 -0500

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>