diff options
| author | donal.k.fellows@manchester.ac.uk <dkf> | 2004-10-27 09:35:37 (GMT) |
|---|---|---|
| committer | donal.k.fellows@manchester.ac.uk <dkf> | 2004-10-27 09:35:37 (GMT) |
| commit | 07392f6f1f7e97037d1317cd186b93e74901e3bb (patch) | |
| tree | 2f3f979845a50074bb8e2a0687cd98cb14ae6c26 /doc/error.n | |
| parent | 28406a1c49f0334b1ca0bb9d15ea725e67551309 (diff) | |
| download | tcl-07392f6f1f7e97037d1317cd186b93e74901e3bb.zip tcl-07392f6f1f7e97037d1317cd186b93e74901e3bb.tar.gz tcl-07392f6f1f7e97037d1317cd186b93e74901e3bb.tar.bz2 | |
Backport many doc fixes
Diffstat (limited to 'doc/error.n')
| -rw-r--r-- | doc/error.n | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/error.n b/doc/error.n index 075f5ec..4cfb044 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.3.18.1 2004/10/27 09:35:38 dkf Exp $ '\" .so man.macros .TH error n "" Tcl "Tcl Built-In Commands" @@ -19,7 +19,7 @@ error \- Generate an error .SH DESCRIPTION .PP -Returns a TCL_ERROR code, which causes command interpretation to be +Returns a \fBTCL_ERROR\fR code, which causes command interpretation to be unwound. \fIMessage\fR is a string that is returned to the application to indicate what went wrong. .PP @@ -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} { + \fBerror\fR "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 |
