Exception: Puppet::ModuleTool::Errors::DowngradingUnsupportedError
- Inherits:
-
UpgradeError
- Object
- RuntimeError
- Error
- ModuleToolError
- UpgradeError
- Puppet::ModuleTool::Errors::DowngradingUnsupportedError
- Defined in:
- lib/puppet/module_tool/errors/upgrader.rb
Instance Attribute Summary
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(options) ⇒ DowngradingUnsupportedError
constructor
A new instance of DowngradingUnsupportedError.
- #multiline ⇒ Object
Methods inherited from ModuleToolError
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() @module_name = [:module_name] @requested_version = [:requested_version] @installed_version = [:installed_version] @conditions = [:conditions] @action = [:action] super _("Could not %{action} '%{module_name}' (%{version}); downgrades are not allowed") % { action: @action, module_name: @module_name, version: vstring } end |
Instance Method Details
#multiline ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/puppet/module_tool/errors/upgrader.rb', line 55 def multiline = [] << _("Could not %{action} module '%{module_name}' (%{version})") % { action: @action, module_name: @module_name, version: vstring } << _(" Downgrading is not allowed.") .join("\n") end |