Skip to content

Commit

Permalink
Mentioning the role of status in exceptions closes #3977
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed Dec 4, 2021
1 parent 7980f95 commit f9cb0a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions doc/Language/exceptions.pod6
Expand Up @@ -66,10 +66,12 @@ default.
A C<CATCH> block uses smartmatching similar to how C<given/when>
smartmatches on options, thus it's possible to catch and handle various
categories of exceptions inside a C<when> block.
categories of exceptions inside a C<when> block. And it does so because,
within the block, C<$_> is set to the exception that has been raised.
To handle all exceptions, use a C<default> statement. This example prints out
almost the same information as the normal backtrace printer.
almost the same information as the normal backtrace printer; the I<dot>
methods apply to C<$_>, which holds the C<Exception> within the C<CATCH> block.
CATCH {
default {
Expand Down

0 comments on commit f9cb0a2

Please sign in to comment.