next-interesting-index
ErrorsCollection

next-interesting-index

Synthesised documentation from type/Backtrace

From type/Backtrace

See Original text in context

method next-interesting-index(Backtrace:D: Int $idx = 0:$named:$noproto:$setting)

Returns the index of the next interesting frame, once hidden and other settings are taken into account. $named will decide whether to printed only those with a name, $noproto will hide protos, and $setting will hide those are considered setting.

sub zipi { { { die "Something bad happened" }() }() };
try zipi;
say $!.backtrace.next-interesting-index;           # OUTPUT: «2␤» 
say $!.backtrace.next-interesting-index:named ); #  OUTPUT: «4␤»