Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[S04] note one more that &eval does not catch exceptions
  • Loading branch information
moritz committed Apr 9, 2012
1 parent 98a47db commit 536a483
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion S04-control.pod
Expand Up @@ -993,7 +993,8 @@ placing a C<CATCH> block I<within> that block that is having its exceptions
handled.

The Perl 6 equivalent to Perl 5's C<eval {...}> is C<try {...}>.
(Perl 6's C<eval> function only evaluates strings, not blocks.)
(Perl 6's C<eval> function only evaluates strings, not blocks, and
does not catch exceptions.)
A C<try> block by default has a C<CATCH> block that handles all fatal
exceptions by ignoring them. If you define a C<CATCH> block within
the C<try>, it replaces the default C<CATCH>. It also makes the C<try>
Expand Down

0 comments on commit 536a483

Please sign in to comment.