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.



175
176
177
178
179
180
# File 'lib/puppet/module_tool/errors/shared.rb', line 175

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



182
183
184
185
186
187
188
# File 'lib/puppet/module_tool/errors/shared.rb', line 182

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