You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2016/06/15 14:49:16 UTC
svn commit: r1748592 - in /tcl/rivet/branches/2.3: ChangeLog
doc/xml/commands.xml
Author: mxmanghi
Date: Wed Jun 15 14:49:16 2016
New Revision: 1748592
URL: http://svn.apache.org/viewvc?rev=1748592&view=rev
Log:
* doc/xml/commands.xml: manual page for ::rivet::catch rewritten
* Changelog: entry for 2.3.1 release corrected (the date was
quite incidentally postponed to 16 June, thus exactly today)
Modified:
tcl/rivet/branches/2.3/ChangeLog
tcl/rivet/branches/2.3/doc/xml/commands.xml
Modified: tcl/rivet/branches/2.3/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.3/ChangeLog?rev=1748592&r1=1748591&r2=1748592&view=diff
==============================================================================
--- tcl/rivet/branches/2.3/ChangeLog (original)
+++ tcl/rivet/branches/2.3/ChangeLog Wed Jun 15 14:49:16 2016
@@ -1,4 +1,9 @@
2016-06-16 Massimo Manghi <mx...@apache.org>
+ * doc/xml/commands.xml: manual page for ::rivet::catch rewritten
+ * Changelog: entry for 2.3.1 release corrected (the date was
+ quite incidentally postponed to 16 June, thus exactly today)
+
+2016-04-16 Massimo Manghi <mx...@apache.org>
* .: released as 2.3.1
2016-04-13 Massimo Manghi <mx...@apache.org>
Modified: tcl/rivet/branches/2.3/doc/xml/commands.xml
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/2.3/doc/xml/commands.xml?rev=1748592&r1=1748591&r2=1748592&view=diff
==============================================================================
--- tcl/rivet/branches/2.3/doc/xml/commands.xml (original)
+++ tcl/rivet/branches/2.3/doc/xml/commands.xml Wed Jun 15 14:49:16 2016
@@ -329,13 +329,14 @@
</term>
<listitem>
<para>
- Clears the contents of the specified table.
+ Clears the contents of the specified table.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>
+
<refentry id="catch">
<refnamediv>
<refname>catch</refname>
@@ -349,29 +350,33 @@
<arg><replaceable>script</replaceable></arg>
<arg><replaceable>error_code_var_name</replaceable></arg>
<arg><replaceable>options_var_name</replaceable></arg>
-
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>
- <command>::rivet::catch</command> is a utility command wrapping of the core language's same command.
- Within mod_rivet a script execution can be interrupted by either calling
- <command>::rivet::exit</command> or <command>::rivet::abort_page</command> that
- return an error code and hand the execution down to any <command>AbortScript</command> and
- eventually to <command>AfterEveryScript</command>.
- Any procedure fired under control of the core <command>::catch</command> would be trapped and
- the error code should be checked and in case the error should be confirmed. <command>::rivet::catch</command>
- 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 <link linkend="directives"><command>AbortScript</command></link>
+ <command>::rivet::catch</command> wraps the core language's same command adding some
+ extra error handling needed by mod_rivet design.
+ The rationale for Rivet to have its own <command>::rivet::catch</command> reads as follows:
+ within mod_rivet a script execution can be interrupted by either calling
+ <command>::rivet::exit</command>(deprecated) or <command>::rivet::abort_page</command>. These commands
+ implement a simple internal exception mechanism by
+ returning a special error code so that execution is in turn handed down to the
+ <command>AbortScript</command> and eventually to <command>AfterEveryScript</command> (if any of them is
+ defined). Any code calling one of these commands running under control of the core
+ <command>::catch</command> command would need to do this chore itself, checking the error info and in case
+ rethrow the error if it was originated by one of mod_rivet's exceptions calls.
+ This is what <command>::rivet::catch</command> does, but by hiding the implementation
+ details provide a better and more compatibile way to handle this condition.
</para>
<note>
- This command is not exported from the <command>::rivet</command> namespace and therefore has
- to be fully qualified.
+ This command is not meant to replace the core command, thus it's notexported from the
+ <command>::rivet</command> namespace and therefore has to be fully qualified.
</note>
</refsect1>
+
</refentry>
<!-- Reference page for command 'clock_to_rfc' -->
<refentry id="clock_to_rfc">
---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org