changeset 49:9d3a42182c45

Enclosed hook call in begin rescue
author unexist
date Sun, 24 Jan 2010 16:21:45 +0100
parents 63e0bb8b9300
children e1262140937e
files subtly/browser.rb
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/subtly/browser.rb	Sun Jan 24 16:14:28 2010 +0100
+++ b/subtly/browser.rb	Sun Jan 24 16:21:45 2010 +0100
@@ -212,7 +212,13 @@
     def run_hook(sym, data = nil)
       @hooks.each do |k, v|
         if(k == sym)
-          @hooks[k].call(data)
+          begin
+            if(@hooks.is_a?(Proc))
+              @hooks[k].call(data)
+            end
+          rescue => exception
+            puts exception.backtrace
+          end
         end
       end
     end # }}}