develooper Front page | perl.perl6.users | Postings from October 2018

Re: Appropriate last words

Thread Previous | Thread Next
From:
yary
Date:
October 23, 2018 07:43
Subject:
Re: Appropriate last words
Message ID:
CAG2CFAbasyT+575tagRh31=RbkXphdgRfcwEc4F8ZLN=kRUB2Q@mail.gmail.com
Better implementation idea

A. A role "X-no-trace" to compose into any exception class,
B. which at BEGIN installs into the outermost scope CATCH block for
anything that does X-no-trace,
C. 3-6 as before :-)

that way, no need for COMPOSE block and $?CLASS variable. And as a bonus,
can add the X-no-trace to a particular exception, without having to create
a custom exception class-
    die X::IO::DoesNotExist.new(:path("foo/bar"), :trying("zombie copy"))
but X-no-trace;

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