Sha256: 7d95693899eacf3019098ccfdf561b5dd64de3ce115abfdacbf7295ef7bbd9fa

Contents?: true

Size: 588 Bytes

Versions: 6

Compression:

Stored size: 588 Bytes

Contents

require 'timeout'

module Evrone
  module Common
    module Spawn

      class TimeoutError < ::Timeout::Error

        def initialize(cmd, seconds)
          @cmd = cmd
          @seconds = seconds
        end

        def to_s
          "Execution of '#{@cmd}' expired"
        end

      end

      class ReadTimeoutError < ::Timeout::Error

        def initialize(cmd, seconds)
          @cmd = cmd
          @seconds = seconds
        end

        def to_s
          "No output has been received of '#{@cmd}' in the last #{@seconds} seconds"
        end
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
evrone-common-spawn-0.0.6 lib/evrone/common/spawn/error.rb
evrone-common-spawn-0.0.5 lib/evrone/common/spawn/error.rb
evrone-common-spawn-0.0.4 lib/evrone/common/spawn/error.rb
evrone-common-spawn-0.0.3 lib/evrone/common/spawn/error.rb
evrone-common-spawn-0.0.2 lib/evrone/common/spawn/error.rb
evrone-common-spawn-0.0.1 lib/evrone/common/spawn/error.rb