This functionality is only available for certain module packages.

hasErrors()

Returns the true value if an error occurred in a previous step of the script; otherwise, the value is false.

hasErrors()
Argument
Return value Boolean true or false