|
From: <dg...@us...> - 2008-12-09 18:10:43
|
A niggly detail on this one. The TIP
describes [throw] as the same as [error]
but with the argument order revised.
However, the reference implementation
doesn't quite match that description.
In particular, the [error] command
always produces the TCL_ERROR return
code. The implemented [throw] always
produces the TCL_RETURN return code.
I think I'd prefer what the TIP proposes
over what's implemented. In fact, I think
it may be necessary to make that correction
for simple test cases of [try {throw...}] to
work as expected. A simple way to
do that (without full syntax checking) is
interp alias {} throw {} return -level 0 -code error -errorcode
DGP
|