AllowExc.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
- '"
- '" Copyright (c) 1989-1993 The Regents of the University of California.
- '" Copyright (c) 1994-1996 Sun Microsystems, Inc.
- '"
- '" See the file "license.terms" for information on usage and redistribution
- '" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- '"
- '" RCS: @(#) $Id: AllowExc.3,v 1.3 2002/03/29 21:01:11 dgp Exp $
- '"
- .so man.macros
- .TH Tcl_AllowExceptions 3 7.4 Tcl "Tcl Library Procedures"
- .BS
- .SH NAME
- Tcl_AllowExceptions - allow all exceptions in next script evaluation
- .SH SYNOPSIS
- .nf
- fB#include <tcl.h>fR
- .sp
- fBTcl_AllowExceptionsfR(fIinterpfR)
- .SH ARGUMENTS
- .AS Tcl_Interp *doublePtr
- .AP Tcl_Interp *interp in
- Interpreter in which script will be evaluated.
- .BE
- .SH DESCRIPTION
- .PP
- If a script is evaluated at top-level (i.e. no other scripts are
- pending evaluation when the script is invoked), and if the script
- terminates with a completion code other than TCL_OK, TCL_ERROR
- or TCL_RETURN, then Tcl normally converts this into a TCL_ERROR
- return with an appropriate message. The particular script
- evaluation procedures of Tcl that act in the manner are
- fBTcl_EvalObjExfR, fBTcl_EvalObjvfR, fBTcl_EvalfR, fBTcl_EvalExfR,
- fBTcl_GlobalEvalfR, fBTcl_GlobalEvalObjfR, fBTcl_VarEvalfR and
- fBTcl_VarEvalVAfR.
- .PP
- However, if fBTcl_AllowExceptionsfR is invoked immediately before
- calling one of those a procedures, then arbitrary completion
- codes are permitted from the script, and they are returned without
- modification.
- This is useful in cases where the caller can deal with exceptions
- such as TCL_BREAK or TCL_CONTINUE in a meaningful way.
- .SH KEYWORDS
- continue, break, exception, interpreter