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
- #environment ⇒ Object
- #issue_code ⇒ Object readonly
- #node ⇒ Object
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
#environment ⇒ Object
60 61 62 |
# File 'lib/puppet/error.rb', line 60 def environment @environment end |
#issue_code ⇒ Object (readonly)
59 60 61 |
# File 'lib/puppet/error.rb', line 59 def issue_code @issue_code 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 |