summaryrefslogtreecommitdiff
path: root/lib/rbot/messagemapper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbot/messagemapper.rb')
-rw-r--r--lib/rbot/messagemapper.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/rbot/messagemapper.rb b/lib/rbot/messagemapper.rb
index 62543f32..87bdd01f 100644
--- a/lib/rbot/messagemapper.rb
+++ b/lib/rbot/messagemapper.rb
@@ -193,7 +193,14 @@ class Bot
if m.bot.auth.allow?(auth, m.source, m.replyto)
debug "template match found and auth'd: #{action.inspect} #{options.inspect}"
if tmpl.options[:thread] || tmpl.options[:threaded]
- Thread.new { @parent.send(action, m, options) }
+ Thread.new do
+ begin
+ @parent.send(action, m, options)
+ rescue Exception => e
+ error "In threaded action: #{e.message}"
+ debug e.backtrace.join("\n")
+ end
+ end
else
@parent.send(action, m, options)
end