method nice

Documentation for method nice assembled from the following types:

class Backtrace

From Backtrace

(Backtrace) method nice

Defined as:

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␤␤»