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
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
As you can see, upstream procedure calls are printed with dollar sign, unevaluated values.
In more complex nested calls, the information about arguments gets lost
and errorInfo does not show which argument values were used.
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
Here is the errorInfo of a true life situation.
The value of "val" is not output.
Maybe it should and it was intended so, but it's not.
So it's a bug then...
Hello Harald,No, this is correct. The bgerror procedure is the old fashion and is
where did you find the second "errordict" argument of the new bgerror
proc. In the bgerror documentation is only the "message" argument.
May be a documentation error?
PS. I will try to answer the oo question later this week.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 991 |
Nodes: | 10 (0 / 10) |
Uptime: | 119:22:21 |
Calls: | 12,958 |
Files: | 186,574 |
Messages: | 3,265,634 |