User Tools

Site Tools


Sidebar

HPL/SQL is included to Apache Hive since version 2.0

error-handling

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== Error Handling in PL/HQL ====== PL/HQL allows you to use exceptions, condition handlers and error code to handle errors. The [[configuration#plhqlonerror|plhql.onerror]] configuration option defines how PL/HQL handles errors. It accepts the following values: * **Exception** (default) In this case when an error occurs, PL/HQL raises an exception. If there is an exception or condition handler for this error, it is executed. * **Seterror** When Seterror is specified, PL/HQL sets the error code to SQLCODE or HOSTCODE variables and continues execution. * **Stop** PL/HQL stops executing the script and exits. Note that you can dynamically change [[configuration#plhqlonerror|plhql.onerror]] option by executing the SET statement in the script: <code> SET plhql.onerror = exception | seterror | stop; </code> **See also:** * [[declare-condition|DECLARE CONDITION]] * [[declare-handler|DECLARE HANDLER]] * [[sqlcode|SQLCODE]] * [[sqlstate|SQLSTATE]] * [[get-diagnostics|GET DIAGNOSTICS]] * [[signal|SIGNAL]] * [[resignal|RESIGNAL]]