diff options
author | dgp <dgp@users.sourceforge.net> | 2004-03-16 22:19:41 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2004-03-16 22:19:41 (GMT) |
commit | 7f955ebb347697e3262c2bf5469bd7552e4bda57 (patch) | |
tree | 6090cd73ac967c3e7e605d21c19e7e83ae2d63c5 /doc/catch.n | |
parent | 25dabc3b3448e17e9f8350b49ffc80346888cba9 (diff) | |
download | tcl-7f955ebb347697e3262c2bf5469bd7552e4bda57.zip tcl-7f955ebb347697e3262c2bf5469bd7552e4bda57.tar.gz tcl-7f955ebb347697e3262c2bf5469bd7552e4bda57.tar.bz2 |
* doc/catch.n: Compiled [catch] no longer fails to catch syntax
errors. Removed the claims in the documentation that it does.
* doc/return.n: Updated example to use [dict merge].
Diffstat (limited to 'doc/catch.n')
-rw-r--r-- | doc/catch.n | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/doc/catch.n b/doc/catch.n index d69670d..65a184c 100644 --- a/doc/catch.n +++ b/doc/catch.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: catch.n,v 1.8 2003/09/02 21:49:42 dgp Exp $ +'\" RCS: @(#) $Id: catch.n,v 1.9 2004/03/16 22:19:43 dgp Exp $ '\" .so man.macros .TH catch n "8.5" Tcl "Tcl Built-In Commands" @@ -78,14 +78,6 @@ dictionary of return options, and the \fBreturn\fR command may be used by scripts to set return options in addition to those defined above. .VE 8.5 -.PP -Note that \fBcatch\fR catches all exceptions, including those -generated by \fBbreak\fR and \fBcontinue\fR as well as errors. The -only errors that are not caught are syntax errors found when the -script is compiled. This is because the catch command only catches -errors during runtime. When the catch statement is compiled, the -script is compiled as well and any syntax errors will generate a Tcl -error. .SH EXAMPLES @@ -98,15 +90,6 @@ if { [catch {open $someFile w} fid] } { exit 1 } .CE -The \fBcatch\fR command will not catch compiled syntax errors. The -first time proc \fBfoo\fR is called, the body will be compiled and a -Tcl error will be generated. - -.CS -proc foo {} { - catch {expr {1 +- }} -} -.CE There are more complex examples of \fBcatch\fR usage in the documentation for the \fBreturn\fR command. |