summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tkextlib/tcllib.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkextlib/tcllib.rb')
-rw-r--r--ext/tk/lib/tkextlib/tcllib.rb29
1 files changed, 25 insertions, 4 deletions
diff --git a/ext/tk/lib/tkextlib/tcllib.rb b/ext/tk/lib/tkextlib/tcllib.rb
index 2955416b2b..831cc5a327 100644
--- a/ext/tk/lib/tkextlib/tcllib.rb
+++ b/ext/tk/lib/tkextlib/tcllib.rb
@@ -11,15 +11,31 @@ require 'tkextlib/setup.rb'
# call setup script
require 'tkextlib/tcllib/setup.rb'
+err = ''
+
# package:: autoscroll
-require 'tkextlib/tcllib/autoscroll'
+target = 'tkextlib/tcllib/autoscroll'
+begin
+ require target
+rescue => e
+ err << "\n ['" << target << "'] " << e.class.name << ' : ' << e.message
+end
# package:: cursor
-require 'tkextlib/tcllib/cursor'
+target = 'tkextlib/tcllib/cursor'
+begin
+ require target
+rescue => e
+ err << "\n ['" << target << "'] " << e.class.name << ' : ' << e.message
+end
# package:: style
-require 'tkextlib/tcllib/style'
-
+target = 'tkextlib/tcllib/style'
+begin
+ require target
+rescue => e
+ err << "\n ['" << target << "'] " << e.class.name << ' : ' << e.message
+end
# autoload
module Tk
@@ -41,3 +57,8 @@ module Tk
autoload :Tkpiechart, 'tkextlib/tcllib/tkpiechart'
end
end
+
+unless err.empty?
+ warn("Warning: some sub-packages are failed to require : " + err)
+end
+