[Groonga-commit] droonga/drntest at af56b3d [master] Output the original content to output file on JSON gneration error

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Dec 13 14:14:58 JST 2013


Kouhei Sutou	2013-12-13 14:14:58 +0900 (Fri, 13 Dec 2013)

  New Revision: af56b3dc43709787e024fde3c988c9eaa72c9804
  https://github.com/droonga/drntest/commit/af56b3dc43709787e024fde3c988c9eaa72c9804

  Message:
    Output the original content to output file on JSON gneration error
    
    We can see diff by this change on JSON generation error.

  Modified files:
    lib/drntest/test-runner.rb

  Modified: lib/drntest/test-runner.rb (+4 -5)
===================================================================
--- lib/drntest/test-runner.rb    2013-12-10 19:15:16 +0900 (cecdddb)
+++ lib/drntest/test-runner.rb    2013-12-13 14:14:58 +0900 (d701287)
@@ -200,12 +200,11 @@ module Drntest
       File.open(output_path, "w") do |file|
         results.each do |result|
           begin
-            json = JSON.pretty_generate(result)
-            file.puts(json)
-          rescue JSON::GeneratorError => error
-            p error
-            p result
+            formatted_result = JSON.pretty_generate(result)
+          rescue JSON::GeneratorError
+            formatted_result = result
           end
+          file.puts(formatted_result)
         end
       end
     end
-------------- next part --------------
HTML����������������������������...
Download 



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