Documentation for method rethrow

Documentation for method rethrow, assembled from the following types:

class Exception

From Exception

(Exception) method rethrow

Defined as:

method rethrow(Exception:D:)

Rethrows an exception that has already been thrown at least once. This is different from throw in that it preserves the original backtrace.

my $e = X::AdHoc.new(payload => "Bad situation");
sub f() { die 'Bad' };
sub g() { try fCATCH { default { .rethrow } } };
g;
CATCH { default { say .backtrace.full } };