Sha256: 5c3b3b8f2247435f8b72e08e13668d7b55c57b0d2008252ada4e1858177a45ab

Contents?: true

Size: 413 Bytes

Versions: 2

Compression:

Stored size: 413 Bytes

Contents

module Gofer
  # An error encountered performing a Gofer command
  class HostError < Exception

    # Instance of Gofer::Host that raised the error
    attr_reader :host

    # Instance of Gofer::Response encapsulating the error output
    attr_reader :response

    def initialize host, response, message
      @host = host
      @response = response
      super "#{host.hostname}: #{message}"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gofer-0.6.0 lib/gofer/host_error.rb
gofer-0.5.0 lib/gofer/host_error.rb