why change my code kibo? $try() is the error handler, all you have to do is check if it != $Null
$try() - Tries to execute and returns the error message if errors. Otherwise it returns $Null
alias try $1- | if ($error) reseterror | return $v1
Example:
alias try-example {
echo 12 -a Trying: "/echo -a test" Result: $try(echo -a Test)
echo 04 -a Trying: "/echo -a" Result: $try(echo -a)
}