summaryrefslogtreecommitdiffstats
path: root/doc/tclvars.n
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2004-11-20 00:17:28 (GMT)
committerdgp <dgp@users.sourceforge.net>2004-11-20 00:17:28 (GMT)
commitff53303dbf5fc75eea7bb3d9bc569267adb1d49b (patch)
tree37544eb5529a0eb1f2f1a0f46ad94a43354cc96b /doc/tclvars.n
parent2c96347f634403dffaf0ecf177118cd8202af841 (diff)
downloadtcl-ff53303dbf5fc75eea7bb3d9bc569267adb1d49b.zip
tcl-ff53303dbf5fc75eea7bb3d9bc569267adb1d49b.tar.gz
tcl-ff53303dbf5fc75eea7bb3d9bc569267adb1d49b.tar.bz2
* doc/AddErrInfo.3: Docs for Tcl_(Get|Set)ReturnOptions. [TIP 227]
* doc/AddErrInfo.3: * doc/Async.3: Documentation updates to replace references * doc/BackgdErr.3: to global variable ::errorInfo and ::errorCode * doc/SaveResult.3: and to the ::bgerror command with references * doc/after.n: to their preferred replacements, the * doc/bgerror.n: -errorinfo and -errorcode return options, * doc/error.n: the Tcl_*InterpState routines, and the * doc/exec.n: [interp bgerror] command. * doc/exit.n: * doc/fileevent.n: * doc/interp.n: * doc/return.n: * doc/tclvars.n: * doc/update.n:
Diffstat (limited to 'doc/tclvars.n')
-rw-r--r--doc/tclvars.n55
1 files changed, 29 insertions, 26 deletions
diff --git a/doc/tclvars.n b/doc/tclvars.n
index 6a25087..f1d0055 100644
--- a/doc/tclvars.n
+++ b/doc/tclvars.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: tclvars.n,v 1.19 2004/11/15 21:46:05 dkf Exp $
+'\" RCS: @(#) $Id: tclvars.n,v 1.20 2004/11/20 00:17:32 dgp Exp $
'\"
.so man.macros
.TH tclvars n 8.0 Tcl "Tcl Built-In Commands"
@@ -51,14 +51,15 @@ won't work on windows and is discouraged for cross-platform usage.
.RE
.TP
\fBerrorCode\fR
-After an error has occurred, this variable will be set to hold
-additional information about the error in a form that is easy
-to process with programs.
-\fBerrorCode\fR consists of a Tcl list with one or more elements.
+This variable holds the value of the \fB-errorcode\fR return option
+set by the most recent error that occurred in this interpreter.
+This list value represents additional information about the error
+in a form that is easy to process with programs.
The first element of the list identifies a general class of
errors, and determines the format of the rest of the list.
-The following formats for \fBerrorCode\fR are used by the
-Tcl core; individual applications may define additional formats.
+The following formats for \fB-errorcode\fR return options
+are used by the Tcl core; individual applications may define
+additional formats.
.RS
.TP
\fBARITH\fI code msg\fR
@@ -74,59 +75,61 @@ or UNKNOWN (if the cause of the error cannot be determined).
.TP
\fBCHILDKILLED\fI pid sigName msg\fR
This format is used when a child process has been killed because of
-a signal. The second element of \fBerrorCode\fR will be the
-process's identifier (in decimal).
-The third element will be the symbolic name of the signal that caused
+a signal. The \fIpid\fR element will be the process's identifier (in decimal).
+The \fIsigName\fR element will be the symbolic name of the signal that caused
the process to terminate; it will be one of the names from the
include file signal.h, such as \fBSIGPIPE\fR.
-The fourth element will be a short human-readable message
+The \fImsg\fR element will be a short human-readable message
describing the signal, such as ``write on pipe with no readers''
for \fBSIGPIPE\fR.
.TP
\fBCHILDSTATUS\fI pid code\fR
This format is used when a child process has exited with a non-zero
-exit status. The second element of \fBerrorCode\fR will be the
-process's identifier (in decimal) and the third element will be the exit
+exit status. The \fIpid\fR element will be the
+process's identifier (in decimal) and the \fIcode\fR element will be the exit
code returned by the process (also in decimal).
.TP
\fBCHILDSUSP\fI pid sigName msg\fR
This format is used when a child process has been suspended because
of a signal.
-The second element of \fBerrorCode\fR will be the process's identifier,
-in decimal.
-The third element will be the symbolic name of the signal that caused
+The \fIpid\fR element will be the process's identifier, in decimal.
+The \fIsigName\fR element will be the symbolic name of the signal that caused
the process to suspend; this will be one of the names from the
include file signal.h, such as \fBSIGTTIN\fR.
-The fourth element will be a short human-readable message
+The \fImsg\fR element will be a short human-readable message
describing the signal, such as ``background tty read''
for \fBSIGTTIN\fR.
.TP
\fBNONE\fR
This format is used for errors where no additional information is
available for an error besides the message returned with the
-error. In these cases \fBerrorCode\fR will consist of a list
-containing a single element whose contents are \fBNONE\fR.
+error. In these cases the \fB-errorcode\fR return option
+will consist of a list containing a single element whose
+contents are \fBNONE\fR.
.TP
\fBPOSIX \fIerrName msg\fR
-If the first element of \fBerrorCode\fR is \fBPOSIX\fR, then
+If the first element is \fBPOSIX\fR, then
the error occurred during a POSIX kernel call.
-The second element of the list will contain the symbolic name
+The \fIerrName\fR element will contain the symbolic name
of the error that occurred, such as \fBENOENT\fR; this will
be one of the values defined in the include file errno.h.
-The third element of the list will be a human-readable
+The \fImsg\fR element will be a human-readable
message corresponding to \fIerrName\fR, such as
``no such file or directory'' for the \fBENOENT\fR case.
.PP
-To set \fBerrorCode\fR, applications should use library
-procedures such as \fBTcl_SetErrorCode\fR and \fBTcl_PosixError\fR,
-or they may invoke the \fBerror\fR command.
+To set the \fB-errorcode\fR return option, applications should use library
+procedures such as \fBTcl_SetObjErrorCode\fR, \fBTcl_SetReturnOptions\fR,
+and \fBTcl_PosixError\fR, or they may invoke the \fB-errorcode\fR
+option of the \fBreturn\fR command.
If one of these methods hasn't been used, then the Tcl
interpreter will reset the variable to \fBNONE\fR after
the next error.
.RE
.TP
\fBerrorInfo\fR
-After an error has occurred, this string will contain one or more lines
+This variable holds the value of the \fB-errorinfo\fR return option
+set by the most recent error that occurred in this interpreter.
+This string value will contain one or more lines
identifying the Tcl commands and procedures that were being executed
when the most recent error occurred.
Its contents take the form of a stack trace showing the various