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- dieX::IO::DoesNotExist.new(:path("foo/bar"), :trying("zombie copy")) but X-no-trace;


Reply via email to