Sujet : Re: try command error codes, where documented?
De : et99 (at) *nospam* rocketship1.me (et99)
Groupes : comp.lang.tclDate : 22. Aug 2024, 22:43:34
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <va8be7$j3e0$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla Thunderbird
On 8/20/2024 10:08 PM,
clt.to.davebr@dfgh.net wrote:
I'm kind of amazed it works too, but it is very nice that it does. My most common use for try {...} finally {...} is to close a file regardless of any errors after reading and maybe processing the contents inside the try script.
daveb
Well, I *finally* decided to read sections 11.2-3 in Ashok's great Tcl book and the text and examples there has cleared up everything for me.
That explains how the try command can execute the finally clause *after* the execution of the return command. It's because try gets to do whatever it wants with the return code of 2 that the return command itself returns.
-e