Exception: NestedText::Errors::ParseError
- Inherits:
-
InternalError
- Object
- StandardError
- NestedText::Error
- InternalError
- NestedText::Errors::ParseError
- Defined in:
- lib/nestedtext/errors.rb
Overview
TODO: rename all Subclasses to ParseXError, just like for Dump
Direct Known Subclasses
DictDuplicateKey, InlineDictKeySyntaxError, InlineDictSyntaxError, InlineExtraCharactersAfterDelimiter, InlineListSyntaxError, InlineMissingValue, InlineNoClosingDelimiter, InvalidIndentation, InvalidIndentationChar, LineTagNotDetected, LineTagUnknown, LineTypeExpectedDictItem, LineTypeExpectedListItem, LineTypeNotExpected, MultilineKeyNoValue, ParseCustomClassNoCreateMethod, ParseCustomClassNotFound
Instance Attribute Summary collapse
-
#colno ⇒ Object
readonly
Returns the value of attribute colno.
-
#lineno ⇒ Object
readonly
Returns the value of attribute lineno.
-
#message_raw ⇒ Object
readonly
Returns the value of attribute message_raw.
Instance Method Summary collapse
-
#initialize(line, colno, message) ⇒ ParseError
constructor
A new instance of ParseError.
Constructor Details
#initialize(line, colno, message) ⇒ ParseError
Returns a new instance of ParseError.
24 25 26 27 28 29 30 31 |
# File 'lib/nestedtext/errors.rb', line 24 def initialize(line, colno, ) # Note, both line and column number are 0-indexed. # But for human display we make them 1-indexed. @lineno = line.lineno @colno = colno @message_raw = super((line)) end |
Instance Attribute Details
#colno ⇒ Object (readonly)
Returns the value of attribute colno.
22 23 24 |
# File 'lib/nestedtext/errors.rb', line 22 def colno @colno end |
#lineno ⇒ Object (readonly)
Returns the value of attribute lineno.
22 23 24 |
# File 'lib/nestedtext/errors.rb', line 22 def lineno @lineno end |
#message_raw ⇒ Object (readonly)
Returns the value of attribute message_raw.
22 23 24 |
# File 'lib/nestedtext/errors.rb', line 22 def @message_raw end |