From 3b1ca15e0739a1650dbc9c0de1429299326078ee Mon Sep 17 00:00:00 2001 From: kjnash Date: Thu, 27 Aug 2020 15:50:24 +0000 Subject: Provide error message if failed load does not. --- library/safe.tcl | 7 +++++++ 1 file changed, 7 insertions(+) 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 } -- cgit v0.12