Accept errors in custom function

Refer to the following example code to see how to set CustomFunction arguments can accept errors.