From 6a2e8cb6f631cf73031843eea3405e4bb21fc0c2 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 20 Jul 2006 14:52:18 +0000 Subject: Include exception class when plugins fail --- lib/rbot/plugins.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/rbot') diff --git a/lib/rbot/plugins.rb b/lib/rbot/plugins.rb index e0425900..65cca909 100644 --- a/lib/rbot/plugins.rb +++ b/lib/rbot/plugins.rb @@ -264,7 +264,7 @@ module Plugins return @@plugins[key].help(key, params) rescue Exception => err #rescue TimeoutError, StandardError, NameError, SyntaxError => err - puts "plugin #{@@plugins[key].name} help() failed: " + err + puts "plugin #{@@plugins[key].name} help() failed: #{err.class}: #{err}" puts err.backtrace.join("\n") end else @@ -282,7 +282,7 @@ module Plugins p.send method, *args rescue Exception => err #rescue TimeoutError, StandardError, NameError, SyntaxError => err - puts "plugin #{p.name} #{method}() failed: " + err + puts "plugin #{p.name} #{method}() failed: #{err.class}: #{err}" puts err.backtrace.join("\n") end end @@ -300,7 +300,7 @@ module Plugins @@plugins[m.plugin].privmsg(m) rescue Exception => err #rescue TimeoutError, StandardError, NameError, SyntaxError => err - puts "plugin #{@@plugins[m.plugin].name} privmsg() failed: " + err + puts "plugin #{@@plugins[m.plugin].name} privmsg() failed: #{err.class}: #{err}" puts err.backtrace.join("\n") end return true -- cgit v1.2.3