"say $!.WHAT" in CATCH block no longer dies, but it gives Nil. The exception is 
available in $_:

$ perl6-m -e '{ die 42; CATCH { say $!.WHAT; say $_.perl } }'
Nil
X::AdHoc.new(payload => 42)
42
  in block <unit> at -e:1

S04/Exception handlers says "An exception handler is just a switch statement on 
an implicit topic that happens to be the current exception to be dealt with. 
Inside the CATCH block, the exception in question is bound to $_."

Maybe someone can clarify whether the exception should also be in $! at that 
time.

Reply via email to