Documentation for variable
$! assembled from the following types:
language documentation Variables
(Variables) variable $!
$! is the error variable. If a
try block or statement prefix catches an exception, that exception is stored in
$!. If no exception was caught,
$! is set to the
Any type object.
CATCH blocks do not set
$!. Rather, they set
$_ inside the block to the caught exception.