develooper Front page | perl.perl6.language | Postings from February 2001

Re: End-of-scope actions: Background.

Thread Previous | Thread Next
From:
Branden
Date:
February 13, 2001 03:34
Subject:
Re: End-of-scope actions: Background.
Message ID:
OE323G5aYY61LEdyt3c00006903@hotmail.com
There's something I didn't quite understand about RFC 88:

When I

    try {
        die "foo";
    } catch {
        die "bar";
    }

I die with "bar", right? But what happens if I

    try {
        die "foo";
    } finally {
        die "bar";
    }

I die with "foo" or "bar" ? Why is this the right behaviour? Any sample code
that shows why this should be done this way and not the other?

Thanks,

- Branden


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About