[Groonga-commit] droonga/droonga-engine at 48cc1f5 [master] Handle any exception raised while processing remote commands

Back to archive index

YUKI Hiroshi null+****@clear*****
Fri Mar 27 13:07:37 JST 2015


YUKI Hiroshi	2015-03-27 13:07:37 +0900 (Fri, 27 Mar 2015)

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

  Message:
    Handle any exception raised while processing remote commands

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

  Modified: lib/droonga/command/serf_event_handler.rb (+6 -0)
===================================================================
--- lib/droonga/command/serf_event_handler.rb    2015-03-27 13:03:11 +0900 (28b9db3)
+++ lib/droonga/command/serf_event_handler.rb    2015-03-27 13:07:37 +0900 (ab9a230)
@@ -37,8 +37,14 @@ module Droonga
 
         serf_name = ENV["SERF_SELF_NAME"]
         command = command_class.new(serf_name, @payload)
+        begin
         command.process if command.should_process?
+        rescue Exception => exception
+          log("Exception: #{exception.inspect}, #{exception.message}, #{exception.backtrace.join(", ")}")
+          raise exception
+        ensure
         output_response(command.response)
+        end
         true
       rescue Exception => exception
         #XXX Any exception blocks following serf operations.
-------------- next part --------------
HTML����������������������������...
Download 



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