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

Re: Appropriate last words

Thread Previous | Thread Next
Richard Hainsworth
October 24, 2018 05:04
Re: Appropriate last words
Message ID:
It seems to me that a role would be a far better idea.

Further if the role could check an environment variable, eg. 
%*ENV<DEBUG_BACKTRACE_ON>, then it could only stop the default Exception 
handler providing backtrace when the environment is set.

May be compiler developers could consider making this part of the 
default exception handler???? The argument being that it is developers 
who need the backtrace, and it is developers who should be able to set 
up their debug environment.

On 23/10/18 15:43, yary wrote:
> 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-
>"foo/bar"), :trying("zombie copy")) 
> but X-no-trace;

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