tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronnie Brunner <ron...@netcetera.ch>
Subject Re: remaining source code issues
Date Tue, 19 Feb 2002 12:55:04 GMT
> It might be nice to create a utility proc for the if {[catch
> .... idiom.  That gives people a simple wrapper to use without
> cluttering up their code too much.  How about:
> 
> proc docatch {code {errmsg "Error occured: $err"}} {
>     if { [catch {
> 	uplevel $code
>     } err] } {
> 	puts [subst -nobackslashes -nocommands "$errmsg"]
>     }
> }

Yes, but I wouldn't even bother to put it somewhere now. Maybe in th
future we'll have something like a HOWTO collection for such things.
I'd really like to keep it as simple as possible at this time. (Every
line we can trow out of the code is an improvment.)
 
Ronnie
------------------------------------------------------------------------
Ronnie Brunner                               ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich    phone +41 1 247 79 79 Fax: +41 1 247 70 75

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org


Mime
View raw message