Details
-
Task
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
PUP 5.3.3
-
None
-
None
Description
The 'Puppet::Resource::Catalog.alias' method prints out the location of an error and should be updated to use Puppet::Util::Errors.error_location() instead so that we're being consistent:
def alias(resource, key)
|
...
|
if existing = @resource_table[newref]
|
return if existing == resource
|
resource_declaration = " at #{resource.file}:#{resource.line}" if resource.file and resource.line
|
existing_declaration = " at #{existing.file}:#{existing.line}" if existing.file and existing.line
|
#TRANSLATORS "resource" here is a Puppet type and should not be translated
|
msg = _("Cannot alias %{ref} to %{key}%{resource_declaration}; resource %{newref} already declared%{existing_declaration}") % { ref: ref, key: key.inspect, resource_declaration: resource_declaration, newref: newref.inspect, existing_declaration: existing_declaration }
|
raise ArgumentError, msg
|
end
|