[Groonga-commit] droonga/droonga-engine at 768c36a [buffered-forward] Output error information to the response of serf queries correctly

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Mar 27 13:17:00 JST 2015


YUKI Hiroshi	2015-03-27 13:17:00 +0900 (Fri, 27 Mar 2015)

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

  Message:
    Output error information to the response of serf queries correctly

  Modified files:
    lib/droonga/command/remote.rb
    lib/droonga/command/serf_event_handler.rb

  Modified: lib/droonga/command/remote.rb (+4 -4)
===================================================================
--- lib/droonga/command/remote.rb    2015-03-27 13:08:04 +0900 (c1c5bca)
+++ lib/droonga/command/remote.rb    2015-03-27 13:17:00 +0900 (f4550b9)
@@ -74,6 +74,10 @@ module Droonga
           true
         end
 
+        def log(message)
+          @response["log"] << message
+        end
+
         private
         def node
           @node ||= NodeName.parse(@serf_name)
@@ -110,10 +114,6 @@ module Droonga
         def catalog
           @catalog ||= JSON.parse(Path.catalog.read)
         end
-
-        def log(message)
-          @response["log"] << message
-        end
       end
 
       class ChangeRole < Base

  Modified: lib/droonga/command/serf_event_handler.rb (+1 -1)
===================================================================
--- lib/droonga/command/serf_event_handler.rb    2015-03-27 13:08:04 +0900 (9faa373)
+++ lib/droonga/command/serf_event_handler.rb    2015-03-27 13:17:00 +0900 (4518339)
@@ -40,7 +40,7 @@ module Droonga
         begin
           command.process if command.should_process?
         rescue Exception => exception
-          log("Exception: #{exception.inspect}, #{exception.message}, #{exception.backtrace.join(", ")}")
+          command.log("Exception: #{exception.inspect}, #{exception.message}, #{exception.backtrace.join(", ")}")
           raise exception
         ensure
           output_response(command.response)
-------------- next part --------------
HTML����������������������������...
Download 



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