diff options
author | ericm <ericm> | 2000-04-26 17:00:43 (GMT) |
---|---|---|
committer | ericm <ericm> | 2000-04-26 17:00:43 (GMT) |
commit | b2c835759a040a3fb8e130df1966f4d37e79785c (patch) | |
tree | 35434a3b3e007b00a2b450c2bf298936dc078867 /doc | |
parent | fcd2945b37a30753e169e9f23f19705960a19e6b (diff) | |
download | tcl-b2c835759a040a3fb8e130df1966f4d37e79785c.zip tcl-b2c835759a040a3fb8e130df1966f4d37e79785c.tar.gz tcl-b2c835759a040a3fb8e130df1966f4d37e79785c.tar.bz2 |
LogCommandInfo man page.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/AddErrInfo.3 | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/doc/AddErrInfo.3 b/doc/AddErrInfo.3 index b1820af..24d47fe 100644 --- a/doc/AddErrInfo.3 +++ b/doc/AddErrInfo.3 @@ -5,13 +5,13 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: AddErrInfo.3,v 1.3 1999/03/10 05:52:45 stanton Exp $ +'\" RCS: @(#) $Id: AddErrInfo.3,v 1.4 2000/04/26 17:00:43 ericm Exp $ '\" .so man.macros -.TH Tcl_AddErrorInfo 3 7.5 Tcl "Tcl Library Procedures" +.TH Tcl_AddErrorInfo 3 8.0 Tcl "Tcl Library Procedures" .BS .SH NAME -Tcl_AddObjErrorInfo, Tcl_AddErrorInfo, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl_PosixError \- record information about errors +Tcl_AddObjErrorInfo, Tcl_AddErrorInfo, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl_PosixError, Tcl_LogCommandInfo \- record information about errors .SH SYNOPSIS .nf \fB#include <tcl.h>\fR @@ -28,6 +28,9 @@ Tcl_AddObjErrorInfo, Tcl_AddErrorInfo, Tcl_SetErrorCode, Tcl_SetErrorCodeVA, Tcl .sp char * \fBTcl_PosixError\fR(\fIinterp\fR) +.sp +void +\fBTcl_LogCommandInfo\fR(\fIinterp, script, command, commandLength\fR) .SH ARGUMENTS .AS Tcl_Interp *message .AP Tcl_Interp *interp in @@ -52,6 +55,12 @@ Last \fIelement\fR argument must be NULL. .AP va_list argList in An argument list which must have been initialised using \fBTCL_VARARGS_START\fR, and cleared using \fBva_end\fR. +.AP char *script in +Pointer to first character in script containing command (must be <= command) +.AP char *command in +Pointer to first character in command that generated the error +.AP int commandLength in +Number of bytes in command; -1 means use all bytes up to first NULL byte .BE .SH DESCRIPTION @@ -144,6 +153,14 @@ It may be convenient to include this string as part of the error message returned to the application in the interpreter's result. .PP +\fBTcl_LogCommandInfo\fR is invoked after an error occurs in an +interpreter. It adds information about the command that was being +executed when the error occured to the \fBerrorInfo\fR variable, and +the line number stored internally in the interpreter is set. On the +first call to \fBTcl_LogCommandInfo\fR or \fBTcl_AddObjErrorInfo\fR +since an error occurred, the old information in \fBerrorInfo\fR is +deleted. +.PP It is important to call the procedures described here rather than setting \fBerrorInfo\fR or \fBerrorCode\fR directly with \fBTcl_ObjSetVar2\fR. |