Exception: PuppetLint::LexerError
- Inherits:
-
StandardError
- Object
- StandardError
- PuppetLint::LexerError
- Defined in:
- lib/puppet-lint/lexer.rb
Overview
Internal: A generic error thrown by the lexer when it encounters something it can’t handle.
Instance Attribute Summary collapse
-
#column ⇒ Object
readonly
Internal: Get the Integer column number of the location of the error.
-
#line_no ⇒ Object
readonly
Internal: Get the Integer line number of the location of the error.
-
#reason ⇒ Object
readonly
Internal: Get the String reason for the error (if known).
Instance Method Summary collapse
-
#initialize(line_no, column, reason = nil) ⇒ LexerError
constructor
Internal: Initialise a new PuppetLint::LexerError object.
- #to_s ⇒ Object
Constructor Details
#initialize(line_no, column, reason = nil) ⇒ LexerError
Internal: Initialise a new PuppetLint::LexerError object.
line_no - The Integer line number of the location of the error. column - The Integer column number of the location of the error. reason - A String describing the cause of the error (if known). rubocop:disable Lint/MissingSuper
27 28 29 30 31 |
# File 'lib/puppet-lint/lexer.rb', line 27 def initialize(line_no, column, reason = nil) @line_no = line_no @column = column @reason = reason end |
Instance Attribute Details
#column ⇒ Object (readonly)
Internal: Get the Integer column number of the location of the error.
16 17 18 |
# File 'lib/puppet-lint/lexer.rb', line 16 def column @column end |
#line_no ⇒ Object (readonly)
Internal: Get the Integer line number of the location of the error.
13 14 15 |
# File 'lib/puppet-lint/lexer.rb', line 13 def line_no @line_no end |
#reason ⇒ Object (readonly)
Internal: Get the String reason for the error (if known).
19 20 21 |
# File 'lib/puppet-lint/lexer.rb', line 19 def reason @reason end |
Instance Method Details
#to_s ⇒ Object
33 34 35 |
# File 'lib/puppet-lint/lexer.rb', line 33 def to_s "PuppetLint::LexerError: Line:#{line_no} Column: #{column} Reason: #{reason}" end |