[Groonga-commit] droonga/fluent-plugin-droonga at d8c4b82 [master] Don't delete record if it is correctly added

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Dec 26 17:35:55 JST 2013


YUKI Hiroshi	2013-12-26 17:35:55 +0900 (Thu, 26 Dec 2013)

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

  Message:
    Don't delete record if it is correctly added

  Modified files:
    lib/droonga/plugin/handler/add.rb

  Modified: lib/droonga/plugin/handler/add.rb (+2 -2)
===================================================================
--- lib/droonga/plugin/handler/add.rb    2013-12-26 17:32:50 +0900 (5ff0a2f)
+++ lib/droonga/plugin/handler/add.rb    2013-12-26 17:35:55 +0900 (8cfc2ad)
@@ -91,11 +91,11 @@ module Droonga
         begin
           record[column] = value
         rescue Groonga::InvalidArgument => error
+          record.delete if record.added?
           raise InvalidValue.new(column, value, request)
         rescue ArgumentError => error
-          raise InvalidValue.new(column, value, request)
-        ensure
           record.delete if record.added?
+          raise InvalidValue.new(column, value, request)
         end
       end
     end
-------------- next part --------------
HTML����������������������������...
下载 



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