mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-04-27 07:33:57 +00:00
$! is not available inside the CATCH{}
This commit is contained in:
parent
d8a1c0cf6a
commit
e538185c0a
@ -738,7 +738,7 @@ try {
|
||||
# You can throw an exception using `die`:
|
||||
die X::AdHoc.new(payload => 'Error !');
|
||||
|
||||
# You can access the last exception with `$!` (usually used in a `CATCH` block)
|
||||
# You can access the last exception with `$!` (use `$_` in a `CATCH` block)
|
||||
|
||||
# There are also some subtelties to exceptions. Some Perl 6 subs return a `Failure`,
|
||||
# which is a kind of "unthrown exception". They're not thrown until you tried to look
|
||||
|
Loading…
Reference in New Issue
Block a user