% proc demo {} {
return -level 0 -code ok -leaky option
set x
}
% catch demo m o
1
% set o
-leaky option -code 1 -level 0 -errorcode NONE -errorinfo {can't read "x": no such variable
while executing
"set x"
(procedure "demo" line 3)
invoked from within
"demo"} -errorline 1
% info patch
8.5.5
Problem appears to be that all commands
returning TCL_OK bypass any (emulation of)
Tcl_ResetResult() on the theory that results
are managed on the execution stack so long
as bytecode is in control. This means
resetting of the return options dict gets
skipped.
|