summaryrefslogtreecommitdiffstats
path: root/library/safe.tcl
diff options
context:
space:
mode:
authorkjnash <k.j.nash@usa.net>2020-08-27 15:50:24 (GMT)
committerkjnash <k.j.nash@usa.net>2020-08-27 15:50:24 (GMT)
commit3b1ca15e0739a1650dbc9c0de1429299326078ee (patch)
tree95a99ed6fc5659fcae12b61ba6f7fc287af791aa /library/safe.tcl
parentc1d3ca8bae0a5f263915dfe708dda37e5ebb6a0d (diff)
downloadtcl-3b1ca15e0739a1650dbc9c0de1429299326078ee.zip
tcl-3b1ca15e0739a1650dbc9c0de1429299326078ee.tar.gz
tcl-3b1ca15e0739a1650dbc9c0de1429299326078ee.tar.bz2
Provide error message if failed load does not.
Diffstat (limited to 'library/safe.tcl')
-rw-r--r--library/safe.tcl7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/safe.tcl b/library/safe.tcl
index 1c46978..c0a5dc6 100644
--- a/library/safe.tcl
+++ b/library/safe.tcl
@@ -1068,6 +1068,13 @@ proc ::safe::AliasLoad {slave file args} {
try {
return [::interp invokehidden $slave load $file $package $target]
} on error msg {
+ # Some packages return no error message.
+ set msg0 "Load of binary library for package $package failed"
+ if {$msg eq {}} {
+ set msg $msg0
+ } else {
+ set msg "$msg0: $msg"
+ }
Log $slave $msg
return -code error $msg
}