[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ERROR: (DejaGnu) proc "::tcl::tm::UnknownHandler {::tcl::MacOSXPkgUn
From: |
Ben Elliston |
Subject: |
Re: ERROR: (DejaGnu) proc "::tcl::tm::UnknownHandler {::tcl::MacOSXPkgUnknown ::tclPkgUnknown} msgcat 1.4" does not exist. |
Date: |
Wed, 2 Mar 2011 23:28:35 +1100 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
David,
Can you please try out this patch?
2011-03-02 Ben Elliston <address@hidden>
* lib/framework.exp (unknown): Rename the native Tcl ::unknown
proc to ::tcl_unknown. If ::tcl_unknown returns a failure result,
then fall back to the conventional DejaGnu handling.
diff --git a/lib/framework.exp b/lib/framework.exp
index ca672a0..b7b5c48 100644
--- a/lib/framework.exp
+++ b/lib/framework.exp
@@ -259,21 +259,26 @@ proc isnative { } {
# unknown -- called by expect if a proc is called that doesn't exist
#
-proc unknown { args } {
- global errorCode
- global errorInfo
- global exit_status
+# Rename unknown to tcl_unknown so that we can wrap tcl_unknown.
+# This allows Tcl package autoloading to work in the modern age.
- clone_output "ERROR: (DejaGnu) proc \"$args\" does not exist."
- if {[info exists errorCode]} {
- send_error "The error code is $errorCode\n"
- }
- if {[info exists errorInfo]} {
- send_error "The info on the error is:\n$errorInfo\n"
- }
+rename ::unknown ::tcl_unknown
+proc unknown args {
+ if {[catch {uplevel 1 ::tcl_unknown $args} msg]} {
+ global errorCode
+ global errorInfo
+ global exit_status
- set exit_status 1
- log_and_exit
+ clone_output "ERROR: (DejaGnu) proc \"$args\" does not exist."
+ if {[info exists errorCode]} {
+ send_error "The error code is $errorCode\n"
+ }
+ if {[info exists errorInfo]} {
+ send_error "The info on the error is:\n$errorInfo\n"
+ }
+ set exit_status 1
+ log_and_exit
+ }
}
# Print output to stdout (or stderr) and to log file