ad_unless_script_abort (public)
ad_unless_script_abort body non_abort_action
Defined in packages/acs-tcl/tcl/exception-procs.tcl
Execute the provided body in the callers' environment. When the body does not raise an "ad_script_abort" exception, the "non_abort_action" is also executed. This pattern is useful when handling client requests and where the "non_abort_action" is used to return results to the client. When "ad_script_abort" is executed, the connection is usually closed, and any attempt to talk to the client over the closed connection will fail. The handling of script_abort exceptions is done usually in the request processor. The function is useful when registering own request procs (e.g., via "ns_register_proc") where the OpenACS request processor is not involved.
- Parameters:
- body (required)
- script, which is always executed
- non_abort_action (required)
- script, which is executed unless the body was aborted.
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: ad_try -auto_abort=false { uplevel $body } trap {AD EXCEPTION ad_script_abort} {r} { # do nothing } on ok RESULT { uplevel $non_abort_action }XQL Not present: Generic, PostgreSQL, Oracle