[Groonga-commit] droonga/droonga-engine at a4dfb67 [master] groonga: Don't return "false" as the result of error message

Back to archive index

YUKI Hiroshi null+****@clear*****
Wed Apr 23 19:12:06 JST 2014


YUKI Hiroshi	2014-04-23 19:12:06 +0900 (Wed, 23 Apr 2014)

  New Revision: a4dfb67cec0e6cfab7b85f88233d128b438762a5
  https://github.com/droonga/droonga-engine/commit/a4dfb67cec0e6cfab7b85f88233d128b438762a5

  Message:
    groonga: Don't return "false" as the result of error message

  Modified files:
    lib/droonga/plugins/groonga/column_list.rb
    lib/droonga/plugins/groonga/generic_command.rb

  Modified: lib/droonga/plugins/groonga/column_list.rb (+1 -2)
===================================================================
--- lib/droonga/plugins/groonga/column_list.rb    2014-04-23 19:09:25 +0900 (97797fe)
+++ lib/droonga/plugins/groonga/column_list.rb    2014-04-23 19:12:06 +0900 (c9ab75d)
@@ -42,8 +42,7 @@ module Droonga
             if table_name.nil? or @context[table_name].nil?
               message = "table doesn't exist: <#{table_name.to_s}>"
               raise CommandError.new(:status => Status::INVALID_ARGUMENT,
-                                     :message => message,
-                                     :result => message)
+                                     :message => message)
             end
 
             columns = list_columns(table_name)

  Modified: lib/droonga/plugins/groonga/generic_command.rb (+5 -1)
===================================================================
--- lib/droonga/plugins/groonga/generic_command.rb    2014-04-23 19:09:25 +0900 (693d70b)
+++ lib/droonga/plugins/groonga/generic_command.rb    2014-04-23 19:12:06 +0900 (1d41be2)
@@ -43,7 +43,11 @@ module Droonga
           result = process_request(request)
           [header(Status::SUCCESS), result]
         rescue CommandError => error
-          [header(error.status, error.message), error.result]
+          unless error.result.nil?
+            [header(error.status, error.message), error.result]
+          else
+            [header(error.status, error.message)]
+          end
         end
 
         private
-------------- next part --------------
HTML����������������������������...
Download 



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