Alias TestError { :error if $error != $null { echo -a An Error has occured: $error | halt } if X echo -a Script never gets this far. }