null+****@clear*****
null+****@clear*****
2012年 3月 6日 (火) 19:13:02 JST
Kouhei Sutou 2012-03-06 19:13:02 +0900 (Tue, 06 Mar 2012) New Revision: 606b179d028393fc06569860d686e324e51e9e2e Log: Handle error on writing to groonga Modified files: lib/groonga/tester.rb Modified: lib/groonga/tester.rb (+6 -2) =================================================================== --- lib/groonga/tester.rb 2012-03-06 17:56:49 +0900 (1431b08) +++ lib/groonga/tester.rb 2012-03-06 19:13:02 +0900 (dc8fb39) @@ -466,9 +466,13 @@ module Groonga def execute_command(line) extract_command_info(line) @loading = true if @current_command == "load" + begin + @groonga.print(line) + @groonga.flush + rescue SystemCallError + raise Error.new("failed to write to groonga: <#{line}>: #{$!}") + end log_input(line) - @groonga.print(line) - @groonga.flush unless @loading log_output(read_output) end