GitHub PullRequestReviewCommentEvent at 2014-04-24 01:42:59
Repository: fluentd
Actor: sonots
Payload: {"comment":{"url":"https://api.github.com/repos/fluent/fluentd/pulls/comments/11933102","id":11933102,"diff_hunk":"@@ -17,33 +17,42 @@\n #\n module Fluent\n   class OutputChain\n-    def initialize(array, tag, es, chain=NullOutputChain.instance)\n+    def initialize(array, tag, es, chain=NullOutputChain.instance, fault_tolerant=false)\n       @array = array\n       @tag = tag\n       @es = es\n       @offset = 0\n       @chain = chain\n+      @fault_tolerant = fault_tolerant\n+      @errors = 0\n     end\n \n     def next\n-      if @array.length <= @offset\n-        return @chain.next\n+      begin\n+        if @array.length <= @offset\n+          return @chain.next\n+        end\n+        @offset += 1\n+        result = @array[@offset-1].emit(@tag, es, self)\n+      rescue Exception => e\n+        @errors += 1\n+        raise e if !@fault_tolerant || @errors == @array.length","path":"lib/fluent/output.rb","position":null,"original_position":26,"commit_id":"228de0d259eaedc10ce43f9ff256d1d2c59920d7","original_commit_id":"a0bb828a07d1984d05b0f2db756c787563a7348b","user":{"login":"sonots","id":2290461,"avatar_url":"https://avatars.githubusercontent.com/u/2290461?","gravatar_id":"aef92c3acc29ad8543e04135687fc4f1","url":"https://api.github.com/users/sonots","html_url":"https://github.com/sonots","followers_url":"https://api.github.com/users/sonots/followers","following_url":"https://api.github.com/users/sonots/following{/other_user}","gists_url":"https://api.github.com/users/sonots/gists{/gist_id}","starred_url":"https://api.github.com/users/sonots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sonots/subscriptions","organizations_url":"https://api.github.com/users/sonots/orgs","repos_url":"https://api.github.com/users/sonots/repos","events_url":"https://api.github.com/users/sonots/events{/privacy}","received_events_url":"https://api.github.com/users/sonots/received_events","type":"User","site_admin":false},"body":"`OutputChainError` should be raised if `one or some of chained outputs failed`. ","created_at":"2014-04-24T01:42:59Z","updated_at":"2014-04-24T01:42:59Z","html_url":"https://github.com/fluent/fluentd/pull/303#discussion_r11933102","pull_request_url":"https://api.github.com/repos/fluent/fluentd/pulls/303","_links":{"self":{"href":"https://api.github.com/repos/fluent/fluentd/pulls/comments/11933102"},"html":{"href":"https://github.com/fluent/fluentd/pull/303#discussion_r11933102"},"pull_request":{"href":"https://api.github.com/repos/fluent/fluentd/pulls/303"}}}}