On Wed, 5 Oct 2005 19:24:47 +0200, Yuval Kogman wrote:
> On Wed, Oct 05, 2005 at 16:57:51 +0100, Peter Haworth wrote:
> > On Mon, 26 Sep 2005 20:17:05 +0200, TSa wrote:
> > > Piers Cawley wrote:
> > > >>Exactly which exception is continued?
> > > > The bottommost one. If you want to return to somewhere up its call
> > > > chain, do:
> > > >
> > > >   $!.caller(n).continue(42)
> > >
> > > Whow, how does a higher level exception catcher *in general* know
> > > what type it should return and how to construct it? The innocent
> > > foo() caller shouldn't bother about a quux() somewhere down the line
> > > of command. Much less of its innards.
> > 
> > Well said.
> 
> No! Not well said at all!

Sorry, I misread that. I thought I was agreeng with "how does a higher
level exception catcher know what to change in order to make resuming the
continuation useful?", especially in the light of Piers saying that the
bottom-most exception should be the one resumed.

The highest level exception is the only one a caller has any right to deal
with, but even then it doesn't really know what will happen if it resumes
some random continuation attached to the exception.

>       CATCH {
>               when some_kind_of_error {
>                       $!.continue($appropriate_value_for_some_kind_of_error)
>               }
>       }

That just gives me the willies, I'm afraid.

-- 
        Peter Haworth   [EMAIL PROTECTED]
"Disconcerting Haworth Fortress Unicycling Melody Gundam"
                -- http://www.channel4.com/4later/bits/manga.html

Reply via email to