Sujet : Re: try... query
De : vivid.tree7955 (at) *nospam* fastmail.com (Petro Kazmirchuk)
Groupes : comp.lang.tclDate : 08. Dec 2024, 11:42:57
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vj3t7g$3o5sn$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla Thunderbird
On 08/12/2024 00:02, Alan Grunwald wrote:
On 07/12/2024 13:36, Harald Oehlmann wrote:
Am 06.12.2024 um 21:35 schrieb Alan Grunwald:
On 06/12/2024 20:12, Alan Grunwald wrote:
On 06/12/2024 17:59, Ralf Fassel wrote:
* Alan Grunwald <nospam.nurdglaw@gmail.com>
<even more helpful context removed>
>
Yes, the magic here is, that the error dict contains "-level 0".
This does not exit the proc and thus, the outer try is also executed.
Take care,
Thanks Harald,
I have a vague memory that I was including a -level flag on the return statement in the past when "issues emerged". I shall keep my fingers crossed that I remember this discussion when strange things happen with this technique in the future.
Alan
I find the "defer" package in Tcllib very useful to achieve RAII in Tcl
https://core.tcl-lang.org/tcllib/doc/trunk/embedded/md/tcllib/files/modules/defer/defer.md