URL
https://opencores.org/ocsvn/or1k_old/or1k_old/trunk
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
578 |
markom |
'\"
|
2 |
|
|
'\" Copyright (c) 1993-1994 The Regents of the University of California.
|
3 |
|
|
'\" Copyright (c) 1994-1996 Sun Microsystems, Inc.
|
4 |
|
|
'\"
|
5 |
|
|
'\" See the file "license.terms" for information on usage and redistribution
|
6 |
|
|
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
7 |
|
|
'\"
|
8 |
|
|
'\" RCS: @(#) $Id: catch.n,v 1.1.1.1 2002-01-16 10:25:24 markom Exp $
|
9 |
|
|
'\"
|
10 |
|
|
.so man.macros
|
11 |
|
|
.TH catch n "" Tcl "Tcl Built-In Commands"
|
12 |
|
|
.BS
|
13 |
|
|
'\" Note: do not modify the .SH NAME line immediately below!
|
14 |
|
|
.SH NAME
|
15 |
|
|
catch \- Evaluate script and trap exceptional returns
|
16 |
|
|
.SH SYNOPSIS
|
17 |
|
|
\fBcatch\fI script \fR?\fIvarName\fR?
|
18 |
|
|
.BE
|
19 |
|
|
|
20 |
|
|
.SH DESCRIPTION
|
21 |
|
|
.PP
|
22 |
|
|
The \fBcatch\fR command may be used to prevent errors from aborting
|
23 |
|
|
command interpretation. \fBCatch\fR calls the Tcl interpreter recursively
|
24 |
|
|
to execute \fIscript\fR, and always returns a TCL_OK code, regardless of
|
25 |
|
|
any errors that might occur while executing \fIscript\fR. The return
|
26 |
|
|
value from \fBcatch\fR is a decimal string giving the
|
27 |
|
|
code returned by the Tcl interpreter after executing \fIscript\fR.
|
28 |
|
|
This will be \fB0\fR (TCL_OK) if there were no errors in \fIscript\fR;
|
29 |
|
|
otherwise
|
30 |
|
|
it will have a non-zero value corresponding to one of the exceptional
|
31 |
|
|
return codes (see tcl.h for the definitions of code values). If the
|
32 |
|
|
\fIvarName\fR argument is given, then it gives the name of a variable;
|
33 |
|
|
\fBcatch\fR will set the variable to the string returned
|
34 |
|
|
from \fIscript\fR (either a result or an error message).
|
35 |
|
|
.PP
|
36 |
|
|
Note that \fBcatch\fR catches all exceptions, including those
|
37 |
|
|
generated by \fBbreak\fR and \fBcontinue\fR as well as errors.
|
38 |
|
|
|
39 |
|
|
.SH KEYWORDS
|
40 |
|
|
catch, error
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.