Skip to content

Commit 97292f8

Browse files
authored
Simplify example
1 parent cf0154f commit 97292f8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/Type/Failure.pod6

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,10 @@ Defined as:
4242
4343
Returns the L<Exception> object that the failure wraps.
4444
45-
sub f() { fail }; my $v = f; $v.exception.throw;
46-
CATCH { default { put .^name, ': ', .Str } };
45+
sub failer() { fail };
46+
my $failure = failer;
47+
my $ex = $failure.exception;
48+
put $ex.^name, ': ', $ex.Str;
4749
# OUTPUT: «X::AdHoc: Failed␤»
4850
4951
=head2 method Bool

0 commit comments

Comments
 (0)