Exception: Puppet::ModuleTool::Errors::DowngradingUnsupportedError

Inherits:
UpgradeError show all
Defined in:
lib/puppet/module_tool/errors/upgrader.rb

Instance Attribute Summary

Attributes inherited from Error

#original

Instance Method Summary collapse

Methods inherited from ModuleToolError

#v, #vstring

Constructor Details

#initialize(options) ⇒ DowngradingUnsupportedError

Returns a new instance of DowngradingUnsupportedError.



45
46
47
48
49
50
51
52
53
# File 'lib/puppet/module_tool/errors/upgrader.rb', line 45

def initialize(options)
  @module_name    = options[:module_name]
  @requested_version = options[:requested_version]
  @installed_version = options[:installed_version]
  @conditions        = options[:conditions]
  @action            = options[:action]

  super _("Could not %{action} '%{module_name}' (%{version}); downgrades are not allowed") % { action: @action, module_name: @module_name, version: vstring }
end

Instance Method Details

#multilineObject



55
56
57
58
59
60
61
# File 'lib/puppet/module_tool/errors/upgrader.rb', line 55

def multiline
  message = []
  message << _("Could not %{action} module '%{module_name}' (%{version})") % { action: @action, module_name: @module_name, version: vstring }
  message << _("  Downgrading is not allowed.")

  message.join("\n")
end