diff options
-rw-r--r-- | library/init.tcl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/library/init.tcl b/library/init.tcl index 1ca6413..ff3a1e3 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -250,7 +250,8 @@ proc unknown args { # Make sure we're not trying to load the same proc twice. # if {[info exists UnknownPending($name)]} { - return -code error "self-referential recursion\ + return -code error -errorcode [list TCL LOOKUP COMMAND $name] \ + "self-referential recursion\ in \"unknown\" for command \"$name\"" } set UnknownPending($name) pending @@ -399,10 +400,12 @@ proc unknown args { return -options $::tcl::UnknownOptions $::tcl::UnknownResult } if {[llength $cmds]} { - return -code error "ambiguous command name \"$name\": [lsort $cmds]" + return -code error -errorcode [list TCL LOOKUP COMMAND $name] \ + "ambiguous command name \"$name\": [lsort $cmds]" } } - return -code error "invalid command name \"$name\"" + return -code error -errorcode [list TCL LOOKUP COMMAND $name] \ + "invalid command name \"$name\"" } # auto_load -- |