Exception: Puppet::Forge::Errors::CommunicationError Private
- Inherits:
-
ForgeError
- Object
- RuntimeError
- Error
- ForgeError
- Puppet::Forge::Errors::CommunicationError
- Defined in:
- lib/puppet/forge/errors.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
This exception is raised when there is a communication error when connecting to the forge
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(options) ⇒ CommunicationError
constructor
private
A new instance of CommunicationError.
-
#multiline ⇒ String
private
Return a multiline version of the error message.
Constructor Details
#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.
50 51 52 53 54 55 56 57 |
# File 'lib/puppet/forge/errors.rb', line 50 def initialize() @uri = [:uri] original = [:original] @detail = original. = _("Unable to connect to the server at %{uri}. Detail: %{detail}.") % { uri: @uri, detail: @detail } super(, original) end |
Instance Method Details
#multiline ⇒ String
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.
Return a multiline version of the error message
62 63 64 65 66 67 68 69 |
# File 'lib/puppet/forge/errors.rb', line 62 def multiline = [] << _('Could not connect to %{uri}') % { uri: @uri } << _(' There was a network communications problem') << _(" The error we caught said '%{detail}'") % { detail: @detail } << _(' Check your network connection and try again') .join("\n") end |