blob: 1cbd151d195d95368f75d8b629e11ca777f476a7 [file] [log] [blame]
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>catch</title><link rel="stylesheet" type="text/css" href="rivet.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="prev" href="apache_table.html" title="apache_table"><link rel="next" href="clock_to_rfc.html" title="clock_to_rfc850_gmt"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">catch</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="apache_table.html"><img src="images/prev.png" alt="Prev"></a> </td><th width="60%" align="center">Rivet Tcl Commands and Variables</th><td width="20%" align="right"> <a accesskey="n" href="clock_to_rfc.html"><img src="images/next.png" alt="Next"></a></td></tr></table></div><div class="refentry"><div class="refentry.separator"><hr></div><a name="catch"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>catch — wraps core command <span style="font-family:monospace"><span class="command"><strong>catch</strong></span></span> and handles in
a special way fake error conditions resulting from calls to <span style="font-family:monospace"><span class="command"><strong>exit</strong></span></span>
and <span style="font-family:monospace"><span class="command"><strong>abort_page</strong></span></span></p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="border: 1px solid #282; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">::rivet::catch</span> ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>script</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>error_code_var_name</code></em></span>? ?<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>options_var_name</code></em></span>?</div></div></div><div class="refsect1"><a name="idm45797167961696"></a><h2>Description</h2><p style="width:90%">
<span style="font-family:monospace"><span class="command"><strong>::rivet::catch</strong></span></span> is a utility command wrapping of the core language's same command.
Within mod_rivet a script execution can be interrupted by either calling
<span style="font-family:monospace"><span class="command"><strong>::rivet::exit</strong></span></span> or <span style="font-family:monospace"><span class="command"><strong>::rivet::abort_page</strong></span></span> that
return an error code and hand the execution down to any <span style="font-family:monospace"><span class="command"><strong>AbortScript</strong></span></span> and
eventually to <span style="font-family:monospace"><span class="command"><strong>AfterEveryScript</strong></span></span>.
Any procedure fired under control of the core <span style="font-family:monospace"><span class="command"><strong>::catch</strong></span></span> would be trapped and
the error code should be checked and in case the error should be confirmed. <span style="font-family:monospace"><span class="command"><strong>::rivet::catch</strong></span></span>
checks for these conditions and in case handles the condition in a proper way interrupting the execution
and returning control to mod_rivet which in turn calls <a class="link" href="directives.html" title="Rivet Apache Directives"><span style="font-family:monospace"><span class="command"><strong>AbortScript</strong></span></span></a>
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><table border="0" summary="Note"><tr><td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="images/note.png"></td><th align="left">Note</th></tr><tr><td align="left" valign="top">
This command is not exported from the <span style="font-family:monospace"><span class="command"><strong>::rivet</strong></span></span> namespace and therefore has
to be fully qualified.
</td></tr></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="apache_table.html"><img src="images/prev.png" alt="Prev"></a> </td><td width="20%" align="center"><a accesskey="u" href="commands.html"><img src="images/up.png" alt="Up"></a></td><td width="40%" align="right"> <a accesskey="n" href="clock_to_rfc.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">apache_table </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="images/home.png" alt="Home"></a></td><td width="40%" align="right" valign="top"> clock_to_rfc850_gmt</td></tr></table></div></body></html>