In perl 5, I would use any of the Carp functions. In perl 6, the search did not help, and trace pragma will print all the stacks, not just the ones I want. I could only use the old to crack the exception, catch it and print:
try { X::AdHoc.new(payload => 'Stack').throw; CATCH { when X::AdHoc { .say; } } }
Or, being a little lazier:
{ die; CATCH { default { .say } } }
What is the right way to do this?
debugging perl6
piojo
source share