summaryrefslogtreecommitdiffstats
path: root/doc/error.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-05-24 12:24:47 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-05-24 12:24:47 (GMT)
commit69dd309d27ba0056161f35744a1639d5eb4e1254 (patch)
treeacf81bd9f0cb680f8f9f2765eb064141c683903d /doc/error.n
parent3998b7fbb74a834fe59c131c7398de7f3eea9430 (diff)
downloadtcl-69dd309d27ba0056161f35744a1639d5eb4e1254.zip
tcl-69dd309d27ba0056161f35744a1639d5eb4e1254.tar.gz
tcl-69dd309d27ba0056161f35744a1639d5eb4e1254.tar.bz2
Added example and cross-reference
Diffstat (limited to 'doc/error.n')
-rw-r--r--doc/error.n11
1 files changed, 9 insertions, 2 deletions
diff --git a/doc/error.n b/doc/error.n
index 075f5ec..b7d6f06 100644
--- a/doc/error.n
+++ b/doc/error.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: error.n,v 1.3 2000/09/07 14:27:47 poenitz Exp $
+'\" RCS: @(#) $Id: error.n,v 1.4 2004/05/24 12:24:47 dkf Exp $
'\"
.so man.macros
.TH error n "" Tcl "Tcl Built-In Commands"
@@ -53,9 +53,16 @@ If the \fIcode\fR argument is not
present, then \fBerrorCode\fR is automatically reset to
``NONE'' by the Tcl interpreter as part of processing the
error generated by the command.
+.SH EXAMPLE
+Generate an error if a basic mathematical operation fails:
+.CS
+if {1+2 != 3} {
+ error "something is very wrong with addition"
+}
+.CE
.SH "SEE ALSO"
-catch(n), tclvars(n)
+catch(n), return(n), tclvars(n)
.SH KEYWORDS
error, errorCode, errorInfo