develooper Front page | perl.perl5.porters | Postings from July 2013

Re: Try/Catch Exception Objects: Possible?

Thread Previous | Thread Next
From:
David Golden
Date:
July 23, 2013 21:55
Subject:
Re: Try/Catch Exception Objects: Possible?
Message ID:
CAOeq1c-Uz8GTJOHtKaHU6OyFxt_d_YQfGeJ7=t0VczaiShNF8g@mail.gmail.com
On Tue, Jul 23, 2013 at 3:54 PM, Paul LeoNerd <leonerd@leonerd.org.uk> wrote:
>
> Here's an amusing question: In such a scheme, would we still want 'die'
> to be the exception-throwing keyword? Why not 'throw'?

I would think we'd want to be using throw as a class method;

  some::exception->throw

Within a try block, I agree that die "foo" should just throw some sort
of generic exception object.

David

-- 
David Golden <xdg@xdg.me>
Take back your inbox! → http://www.bunchmail.com/
Twitter/IRC: @xdg

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