i never did use set varName [catch {script} varName2]

i usually pair it with ... IF statement

if { [ catch {script} varName] } {
   ...
}

any error in the script will produce 1 or 0 if no errors... the error msg
will be placed in varName...

http://www.sco.com/Technology/tcl/man-8.0/tcl/TclCmd/catch.htm

hope this helps...


----- Original Message -----
From: "Scott LaPlante" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 02, 2001 6:28 AM
Subject: [AOLSERVER] catch return values


> *********************************************************
>
> This email was scanned and certified virus-free by Edsamail Mailscan.
> *********************************************************
>


----------------------------------------------------------------------------
----


> i know this is outside of the bounds of aolserver in particular,
> but i was wondering if you have any idea why this:
>
> set catchReturn \
>   [catch {
>     return "my return value"
>    } catchResult]
> puts "catch return is: $catchReturn"
> puts "script result is: $catchResult"
>
> spits out:
>
> catch return is: 2
> script result is: my return value
>
> ?? catch should return 0 if the script doesn't exit with an error,
correct?
>
>
> not a stopping point, but mostly curious on the tcl implementation.
>
> we're using 8.3 and aolserver 3.3.1
>
> thanks all,
> scott

Reply via email to