[Groonga-commit] droonga/fluent-plugin-droonga at 4eda6a6 [master] search: handle incompatible encoding error

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Apr 10 18:30:36 JST 2014


Kouhei Sutou	2014-04-10 18:30:36 +0900 (Thu, 10 Apr 2014)

  New Revision: 4eda6a678dd069b95715b52792a0e04f7624f426
  https://github.com/droonga/fluent-plugin-droonga/commit/4eda6a678dd069b95715b52792a0e04f7624f426

  Message:
    search: handle incompatible encoding error
    
    It may be occurred when inspecting object to generate error message.

  Modified files:
    lib/droonga/searcher.rb

  Modified: lib/droonga/searcher.rb (+6 -1)
===================================================================
--- lib/droonga/searcher.rb    2014-04-10 18:25:25 +0900 (eeccb87)
+++ lib/droonga/searcher.rb    2014-04-10 18:30:36 +0900 (70d06c3)
@@ -291,9 +291,14 @@ module Droonga
           if condition["allowColumn"]
             options[:allow_column] = true
           end
+          syntax_errors = [
+            Groonga::SyntaxError,
+            Groonga::InvalidArgument,
+            Encoding::CompatibilityError,
+          ]
           begin
             expression.parse(query, options)
-          rescue Groonga::SyntaxError, Groonga::InvalidArgument
+          rescue *syntax_errors
             raise SyntaxError.new("query", query)
           end
         elsif condition["script"]
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index