Sujet : Re: Show argument values in bgerror
De : wortkarg3 (at) *nospam* yahoo.com (Harald Oehlmann)
Groupes : comp.lang.tclDate : 18. Sep 2024, 08:14:34
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vcdukq$3vk7h$2@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
Am 17.09.2024 um 23:31 schrieb alexandru:
I have this ::bgerror function to help debug errors in program flow:
proc ::bgerror {message} {
global errorInfo
puts "*** START OF ERROR MESSAGE ***\n$message\n$errorInfo\n*** END OF
ERROR MESSAGE ***"
}
The issue is, that the errorInfo does not show the values of the
arguments of called procedures in the stack.
Thus it's often not clear which arguments lead the the error.
Is there a trick how to show the values with which the procedures were
called in the stack prior to the error?
Many thanks
Alexandru
info errorstack ?
% proc e {v} {incr v}
% e a
expected integer but got "a"
% set errorInfo
expected integer but got "a"
while executing
"incr v"
(procedure "e" line 1)
invoked from within
"e a"
% info errorstack
INNER incrScalar1Imm CALL {e a}
Harald