]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
Catch another non-standard error
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Thu, 20 Feb 2014 20:50:27 +0000 (21:50 +0100)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sat, 29 May 2021 14:21:46 +0000 (16:21 +0200)
lib/rbot/plugins.rb

index 76c76ae199467d7537e90cd213b3807b89bbb45f..06cc09e7527b8a3ad14feaea6ac144b7215b33e8 100644 (file)
@@ -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