[Groonga-commit] groonga/grntest at f570768 [master] Handle error that is not handled by executor

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Nov 22 12:23:12 JST 2013


Kouhei Sutou	2013-11-22 12:23:12 +0900 (Fri, 22 Nov 2013)

  New Revision: f570768b3d21874ed63234e0b6cc8f1d709f10b3
  https://github.com/groonga/grntest/commit/f570768b3d21874ed63234e0b6cc8f1d709f10b3

  Message:
    Handle error that is not handled by executor

  Modified files:
    lib/grntest/executors/base-executor.rb

  Modified: lib/grntest/executors/base-executor.rb (+10 -1)
===================================================================
--- lib/grntest/executors/base-executor.rb    2013-10-14 22:53:19 +0900 (9840416)
+++ lib/grntest/executors/base-executor.rb    2013-11-22 12:23:12 +0900 (399a725)
@@ -250,12 +250,21 @@ module Grntest
       def execute_command(command)
         extract_command_info(command)
         log_input("#{command.original_source}\n")
-        response = send_command(command)
+        begin
+          response = send_command(command)
+        rescue => error
+          log_error("# error: #{error.class}: #{error.message}")
+          error.backtrace.each do |line|
+            log_error("# error: #{line}")
+          end
+          @context.error
+        else
         type = @output_type
         log_output(response)
         log_error(extract_important_messages(read_all_log))
 
         @context.error if error_response?(response, type)
+        end
       end
 
       def read_all_log
-------------- next part --------------
HTML����������������������������...
Download 



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