From: Giuseppe Bilotta Date: Thu, 20 Feb 2014 20:50:27 +0000 (+0100) Subject: Catch another non-standard error X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=fcbe2a81573046c4381d72c1b294002cbd68b47c;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git Catch another non-standard error --- 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