In Backtrace§

See primary documentation in context for method nice

method nice(Backtrace:D: :$oneline)

Returns the backtrace as a list of interesting frames. If :$oneline is set, will stop after the first frame.

sub zipi { { { die "Something bad happened" }() }() };
try zipi;
say $!.backtrace.nice:oneline ) if $!;
# OUTPUT: «  in sub zipi at /tmp/... line 1␤␤»