blob: f26baef6e3dfbaf62496dbf01e9be86afcbea3c6 [file] [log] [blame]
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>abort_page</title><link rel="stylesheet" type="text/css" href="rivet.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.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="abort_code.html" title="abort_code"><link rel="next" href="apache_log_error.html" title="apache_log_error"></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">abort_page</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="abort_code.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="apache_log_error.html"><img src="images/next.png" alt="Next"></a></td></tr></table></div><div class="refentry" title="abort_page"><div class="refentry.separator"><hr></div><a name="abort_page"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>abort_page &#8212;
Stops outputing data to web page, similar in
purpose to PHP's <span style="font-family:monospace"><span class="command"><strong>die</strong></span></span> command.
</p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><div class="cmdsynopsis" style="width:80%"><div style="background:#ccccff ; margin:1ex ; padding:.4ex; padding-left: 0.8ex; word-spacing:1ex "><span style="font-weight:bold ; font-family:monospace">abort_page</span> (<span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>abort code</code></em></span> | <span style="font-family:monospace; font-weight: bold;"><em class="replaceable"><code>-aborting</code></em></span>)</div></div></div><div class="refsect1" title="Description"><a name="idp5732928"></a><h2>Description</h2><p style="width:90%">
This command flushes the output buffer and stops the Tcl
script from sending any more data to the client.
A normal Tcl script might use the
<span style="font-family:monospace"><span class="command"><strong>exit</strong></span></span> command, but that cannot be used in
Rivet without actually exiting the apache child
process!
<span style="font-family:monospace"><span class="command"><strong>abort_page</strong></span></span> triggers
the execution of an optional AbortScript that has to be
specified in the configuration. The value of the
argument ?<span style="font-family:monospace; font-weight: bold;">abort code</span>? can be retrieved with the
<span style="font-family:monospace"><span class="command"><strong>abort_code</strong></span></span> command during the
execution of AbortScript or AfterEveryScript, allowing
the script to take appropriate actions in order to deal
with the cause of the abort.
</p><p style="width:90%">
When passed the argument <span style="font-family:monospace"><span class="command"><strong>-aborting</strong></span></span> the
command returns 1 if abort_page
had been called earlier in the request processing, thus
providing a tool for code in AfterEveryScript to tell
if the an abort condition took place.
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="abort_code.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="apache_log_error.html"><img src="images/next.png" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">abort_code </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"> apache_log_error</td></tr></table></div></body></html>