Exception: Puppet::ModuleTool::Errors::InvalidModuleError

Inherits:
ModuleToolError show all
Defined in:
lib/puppet/module_tool/errors/shared.rb

Instance Attribute Summary

Attributes inherited from Error

#original

Instance Method Summary collapse

Methods inherited from ModuleToolError

#v, #vstring

Constructor Details

#initialize(name, options) ⇒ InvalidModuleError

Returns a new instance of InvalidModuleError


180
181
182
183
184
185
# File 'lib/puppet/module_tool/errors/shared.rb', line 180

def initialize(name, options)
  @name   = name
  @action = options[:action]
  @error  = options[:error]
  super _("Could not %{action} '%{module_name}'; %{error}") % { action: @action, module_name: @name, error: @error.message }
end

Instance Method Details

#multilineObject


187
188
189
190
191
192
193
# File 'lib/puppet/module_tool/errors/shared.rb', line 187

def multiline
  message = []
  message << _("Could not %{action} module '%{module_name}'") % { action: @action, module_name: @name }
  message << _("  Failure trying to parse metadata")
  message << _("    Original message was: %{message}") % { message: @error.message }
  message.join("\n")
end