mipearson/gofer

View on GitHub
lib/gofer/host_error.rb

Summary

Maintainability
A
0 mins
Test Coverage
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