Exception: Puppet::ParseErrorWithIssue
- Inherits:
-
ParseError
- Object
- RuntimeError
- Error
- ParseError
- Puppet::ParseErrorWithIssue
- Defined in:
- lib/puppet/error.rb
Overview
Contains an issue code and can be annotated with an environment and a node
Direct Known Subclasses
Instance Attribute Summary collapse
-
#basic_message ⇒ Object
readonly
Returns the value of attribute basic_message.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#issue_code ⇒ Object
readonly
Returns the value of attribute issue_code.
-
#node ⇒ Object
Returns the value of attribute node.
Attributes included from ExternalFileError
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(message, file = nil, line = nil, pos = nil, original = nil, issue_code = nil) ⇒ ParseErrorWithIssue
constructor
A new instance of ParseErrorWithIssue.
- #to_s ⇒ Object
Constructor Details
#initialize(message, file = nil, line = nil, pos = nil, original = nil, issue_code = nil) ⇒ ParseErrorWithIssue
Returns a new instance of ParseErrorWithIssue.
69 70 71 72 73 |
# File 'lib/puppet/error.rb', line 69 def initialize(, file=nil, line=nil, pos=nil, original=nil, issue_code= nil) super(, file, line, pos, original) @issue_code = issue_code = end |
Instance Attribute Details
#basic_message ⇒ Object (readonly)
Returns the value of attribute basic_message.
59 60 61 |
# File 'lib/puppet/error.rb', line 59 def end |
#environment ⇒ Object
Returns the value of attribute environment.
60 61 62 |
# File 'lib/puppet/error.rb', line 60 def environment @environment end |
#issue_code ⇒ Object (readonly)
Returns the value of attribute issue_code.
59 60 61 |
# File 'lib/puppet/error.rb', line 59 def issue_code @issue_code end |
#node ⇒ Object
Returns the value of attribute node.
60 61 62 |
# File 'lib/puppet/error.rb', line 60 def node @node end |
Instance Method Details
#to_s ⇒ Object
75 76 77 78 79 80 |
# 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 |