[Groonga-commit] droonga/drndump at 15322e1 [master] Handle any exceptions while dump and report if to handler

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Apr 21 14:43:29 JST 2015


YUKI Hiroshi	2015-04-21 14:43:29 +0900 (Tue, 21 Apr 2015)

  New Revision: 15322e10d03f62a9ea55aa2315944df5f1d3343f
  https://github.com/droonga/drndump/commit/15322e10d03f62a9ea55aa2315944df5f1d3343f

  Message:
    Handle any exceptions while dump and report if to handler

  Modified files:
    lib/drndump/dump_client.rb

  Modified: lib/drndump/dump_client.rb (+6 -0)
===================================================================
--- lib/drndump/dump_client.rb    2015-04-17 22:37:15 +0900 (25ccc9f)
+++ lib/drndump/dump_client.rb    2015-04-21 14:43:29 +0900 (0b9f8b9)
@@ -85,6 +85,7 @@ module Drndump
         },
       }
       client.subscribe(dump_message) do |message|
+        begin
         on_progress(message)
         case message
         when Droonga::Client::Error
@@ -137,6 +138,11 @@ module Drndump
           on_error(error)
           @error_message = error.to_s
         end
+        rescue Exception => exception
+          client.close
+          on_error(exception)
+          @error_message = exception.to_s
+        end
       end
 
       @error_message
-------------- next part --------------
HTML����������������������������...
Télécharger 



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