Either exit request or continue processing when there is an error in executing a query.
When a database statement (like run-query
) fails, either exit request processing if "exit" is used, or continue if "continue" is used. "Exiting" is equivalent to calling report-error
with the message containing details about the error. "Continuing" means that your program will continue but you should examine error code (see "error" clause in run-query
) and handle any issues.
The default action is "exit". You can switch back and forth between "exit" and "continue". Typically, "exit" is preferable because errors in database SQL code generally mean application issues, i.e. bugs that need fixing, however "continue" may be used when application wants to attempt to recover from errors or perform other actions.
Note that you can override the effect of on-error for a specific query by using "on-error-continue" and "on-error-exit" clauses in run-query
Optional <database> is specified in "@" clause and is the name of the database_config_file