summaryrefslogtreecommitdiffstats
path: root/doc/catch.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/catch.n')
-rw-r--r--doc/catch.n19
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.