From fcbe2a81573046c4381d72c1b294002cbd68b47c Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Thu, 20 Feb 2014 21:50:27 +0100 Subject: [PATCH] Catch another non-standard error --- lib/rbot/plugins.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/rbot/plugins.rb b/lib/rbot/plugins.rb index 76c76ae1..06cc09e7 100644 --- a/lib/rbot/plugins.rb +++ b/lib/rbot/plugins.rb @@ -653,6 +653,10 @@ module Plugins # idiotic approaches if err.class.respond_to? :from_message newerr = err.class.from_message(msg) + elsif ([:file, :line, :column, :offset, :problem, :context] & err.methods).length == 6 + # Another ‘brillian’ overload, this time from Psych::SyntaxError + # In this case we'll just leave the message as-is + newerr = err.dup else raise aerr_in_err end -- 2.39.2