Receiving Error Information in the SET Clause
If you use the SET clause, when an exception occurs, the SQL error code and (optionally) the ISAM error code are inserted into the variables that are specified in the SET clause. If you provide an error_data_var, any error text that the database server returns is put into the error_data_var. Error text includes information such as the offending table or column name.