vendored/puppet/lib/puppet/pops/issues.rb in bolt-0.17.1 vs vendored/puppet/lib/puppet/pops/issues.rb in bolt-0.17.2
- old
+ new
@@ -47,11 +47,10 @@
msgdata = MessageData.new(*arg_names)
begin
# Evaluate the message block in the msg data's binding
msgdata.format(hash, &message_block)
rescue StandardError => e
- MessageData
raise RuntimeError, _("Error while reporting issue: %{code}. %{message}") % { code: issue_code, message: e.message }, caller
end
end
end
@@ -69,11 +68,11 @@
end
end
def format(hash, &block)
@data = hash
- instance_eval &block
+ instance_eval(&block)
end
# Obtains the label provider given as a key `:label` in the hash passed to #format. The label provider is
# return if no arguments are given. If given an argument, returns the result of calling #label on the label
# provider.
@@ -117,11 +116,11 @@
# should not end with a period as additional information may be appended.
#
# @see MessageData
# @api public
#
- def self.issue (issue_code, *args, &block)
+ def self.issue(issue_code, *args, &block)
Issue.new(issue_code, *args, &block)
end
# Creates a non demotable issue.
# @see Issue.issue
@@ -737,9 +736,13 @@
_('Invalid syntax in heredoc expected @(endtag[:syntax][/escapes])')
end
HEREDOC_WITHOUT_TEXT = hard_issue :HEREDOC_WITHOUT_TEXT do
_('Heredoc without any following lines of text')
+ end
+
+ HEREDOC_EMPTY_ENDTAG = hard_issue :HEREDOC_EMPTY_ENDTAG do
+ _('Heredoc with an empty endtag')
end
HEREDOC_MULTIPLE_AT_ESCAPES = hard_issue :HEREDOC_MULTIPLE_AT_ESCAPES, :escapes do
_("An escape char for @() may only appear once. Got '%{escapes}'") % { escapes: escapes.join(', ') }
end