UDF Error Handling

Call functions that are members of the initial FunctionContext* argument passed to your function to handle UDF errors.

Use the following signature in the function to record warnings for conditions that indicate minor, recoverable problems that do not cause the query to stop:

bool AddWarning(const char* warning_msg);

Use the following signature if you want the UDF to set an error flag that prevents the query from returning any results in serious cases where the query cancellation must occur.

void SetError(const char* error_msg);