YUKI Hiroshi
null+****@clear*****
Thu Mar 26 19:49:08 JST 2015
YUKI Hiroshi 2015-03-26 19:49:08 +0900 (Thu, 26 Mar 2015) New Revision: 406bb48a5c1937d504366402d96849b4036789c9 https://github.com/droonga/droonga-engine/commit/406bb48a5c1937d504366402d96849b4036789c9 Message: Cancel adding of new record when TypeError is raised. For example: TypeError: bulked object should be one of [nil, true, false, String, Symbol, Integer, Float, Time, Groonga::Object, Groonga::Record]: {"_id"=>1, "_key"=>"node0"} Modified files: lib/droonga/plugins/crud.rb Modified: lib/droonga/plugins/crud.rb (+3 -0) =================================================================== --- lib/droonga/plugins/crud.rb 2015-03-26 19:39:34 +0900 (2357fab) +++ lib/droonga/plugins/crud.rb 2015-03-26 19:49:08 +0900 (e5ff253) @@ -121,6 +121,9 @@ module Droonga rescue ArgumentError => error record.delete if record.added? raise InvalidValue.new(column, value, error.message, request) + rescue TypeError => error + record.delete if record.added? + raise InvalidValue.new(column, value, error.message, request) rescue ::Groonga::NoSuchColumn => error record.delete if record.added? raise UnknownColumn.new(column, request["table"], request) -------------- next part -------------- HTML����������������������������...Download