Skip to content

Commit

Permalink
handle exceptions when the child writer goes wonky
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Patten committed Feb 27, 2017
1 parent 8587d57 commit 8007abd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/ztk/parallel.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ def process(&block)

if !data.nil?
config.ui.logger.debug { "write(#{data.inspect})" }
child_writer.write(Base64.encode64(Marshal.dump(data)))
begin
child_writer.write(Base64.encode64(Marshal.dump(data)))
rescue Exception => e
config.ui.logger.warn { "Exception while writing data to child_writer! - #{e.inspect}" }
end
end

child_reader.close
Expand Down

0 comments on commit 8007abd

Please sign in to comment.