lib/wire/resource/network_injection.rb
# counts errors in a text output from given
# +exec_obj+
counts errors in a text output from given
counts errors in a text output from given
def count_errors(exec_obj)
        num_errors = 0
        re = Regexp.new '^ERROR.*'
        exec_obj.stdout.split("\n").each do |line|
          $log.debug line
          next unless line.match(re)
          $log.debug "Matching error output: #{line}"
          num_errors += 1
        end
        num_errors
      end
def count_errors ( exec_obj ) num_errors = 0 re = Regexp . new '^ERROR.*' exec_obj . stdout . split ( "\n" ) . each do | line | $log . debug line next unless line . match ( re ) $log . debug "Matching error output: #{line}" num_errors += 1 end num_errors end
counts errors in a text output from given
+exec_obj+
counts errors in a text output from given + exec_obj +
exec_obj
<not_specific>