If you detect an error in your function, you can bail out of it. For normal errors, such as wrong types of arguments, you can fail to compute the function by adding the empty statement bailout. If something went really wrong and you want to completely kill the current computation, you can use exception.
Look at lib.gel for some examples.