[Groonga-commit] droonga/drntest at 31f42de [master] Normalize error information

Back to archive index

YUKI Hiroshi null+****@clear*****
Mon Jan 27 18:00:58 JST 2014


YUKI Hiroshi	2014-01-27 18:00:58 +0900 (Mon, 27 Jan 2014)

  New Revision: 31f42de6c91ae93b4cdc346665200df6de9cbbd7
  https://github.com/droonga/drntest/commit/31f42de6c91ae93b4cdc346665200df6de9cbbd7

  Message:
    Normalize error information

  Modified files:
    lib/drntest/response-normalizer.rb

  Modified: lib/drntest/response-normalizer.rb (+12 -0)
===================================================================
--- lib/drntest/response-normalizer.rb    2014-01-24 16:33:30 +0900 (9410c2c)
+++ lib/drntest/response-normalizer.rb    2014-01-27 18:00:58 +0900 (91ea380)
@@ -59,6 +59,18 @@ module Drntest
       normalized_in_reply_to = "request-id"
       in_reply_to = message["inReplyTo"]
       message["inReplyTo"] = normalized_in_reply_to if in_reply_to
+
+      errors = message["errors"]
+      message["errors"] = normalize_errors(errors) if errors
+    end
+
+    def normalize_errors(errors)
+      normalized_errors = {}
+      error_detials = errors.detials
+      errors.keys.each_with_index do |source, index|
+        normalized_errors["sources#{index}"] = error_detials[index]
+      end
+      normalized_errors
     end
 
     def normalize_groonga_command_response!(response)
-------------- next part --------------
HTML����������������������������...
Download 



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