Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Rephrasing and reflow
  • Loading branch information
JJ committed Jun 8, 2019
1 parent 6f17c54 commit 69ea20e
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions doc/Type/Backtrace.pod6
Expand Up @@ -6,12 +6,23 @@
class Backtrace {}
A backtrace shows the dynamic call stack, usually leading up to a point
where an exception was thrown.
It is a List of L<Backtrace::Frame> objects. Its default stringification
excludes backtrace frames that are deemed unnecessary or confusing, for
example routines like C<&die> are hidden by default.
A backtrace contains the dynamic call stack, usually leading up to a point where
an exception was thrown, and is a List of L<Backtrace::Frame> objects. Its
default stringification excludes backtrace frames that are deemed unnecessary or
confusing; for example routines like C<&die> are hidden by default. Being a
list, you can also access individual elements.
=for code
sub zipi { { { die "Something bad happened" }() }() };
try {
zipi;
}
if ($!) {
say $!.backtrace[*-1].perl;
}
This will print the last dataframe in the list, pointing at the line where it's
happened.
=head1 Methods
Expand Down

0 comments on commit 69ea20e

Please sign in to comment.