Method: Puppet::Forge::Errors::CommunicationError#initialize

Defined in:
lib/puppet/forge/errors.rb

#initialize(options) ⇒ CommunicationError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of CommunicationError.

Parameters:

  • options (Hash)

    a customizable set of options

Options Hash (options):

  • :uri (String)

    The URI that failed

  • :original (String)

    the original exception



50
51
52
53
54
55
56
57
# File 'lib/puppet/forge/errors.rb', line 50

def initialize(options)
  @uri     = options[:uri]
  original = options[:original]
  @detail  = original.message

  message = _("Unable to connect to the server at %{uri}. Detail: %{detail}.") % { uri: @uri, detail: @detail }
  super(message, original)
end