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

Re: Try/Catch Exception Objects: Possible?

Thread Previous | Thread Next
Lukas Mai
July 27, 2013 22:44
Re: Try/Catch Exception Objects: Possible?
Message ID:
On 24.07.2013 00:05, Aristotle Pagaltzis wrote:
> * David E. Wheeler <> [2013-07-23 22:00]:
>> The catch block should not do conditional execution. One should use
>> a switch statement or whatever inside the catch block.
> That means if you want to take only the exceptions you understand how to
> handle, then a) you need another level of nesting and b) you need to add
> boilerplate to rethrow the exception.
> That is exactly what grates on me when I use Try::Tiny. But I don’t hold
> that against it: Perl simply does not provide the means to sanely offer
> better as a module.

Try::Tiny::ByClass tries to do that.

Lukas Mai <>

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About