class Puppet::ParseErrorWithIssue

Contains an issue code and can be annotated with an environment and a node

Attributes

basic_message[R]
environment[RW]
issue_code[R]
node[RW]

Public Instance Methods

to_s() click to toggle source
# File lib/puppet/error.rb, line 75
def to_s
  msg = super
  msg = "Could not parse for environment #{environment}: #{msg}" if environment
  msg = "#{msg} on node #{node}" if node
  msg
end

Public Class Methods

new(message, file=nil, line=nil, pos=nil, original=nil, issue_code= nil) click to toggle source

@param message [String] The error message @param file [String] The path to the file where the error was found @param line [Integer] The line in the file @param pos [Integer] The position on the line @param original [Exception] Original exception @param #issue_code [Symbol] The issue code

# File lib/puppet/error.rb, line 69
def initialize(message, file=nil, line=nil, pos=nil, original=nil, issue_code= nil)
  super(message, file, line, pos, original)
  @issue_code = issue_code
  @basic_message = message
end