def parse_error(lines)
      if lines.size == 1
        case lines.first
          when '# Unknown service' then raise UnknownService
          when '# Bad exit'        then raise BadExit
        end
      end
    end
def parse_error(lines)
      if lines.size == 1
        case lines.first
          when '# Unknown service' then raise UnknownService
          when '# Bad exit'        then raise BadExit
        end
      end
    end
Detect error from output