Exception: Kwalify::SyntaxError
- Inherits:
-
BaseError
- Object
- StandardError
- KwalifyError
- BaseError
- Kwalify::SyntaxError
- Defined in:
- lib/kwalify/errors.rb
Overview
syntax error for YAML and JSON
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BaseError
#column, #error_symbol, #filename, #linenum, #path, #rule, #value
Instance Method Summary collapse
-
#initialize(msg, linenum = nil, error_symbol = nil) ⇒ SyntaxError
constructor
KwalifyError.
-
#message ⇒ Object
attr_accessor :linenum, :error_symbol.
Methods inherited from BaseError
Constructor Details
#initialize(msg, linenum = nil, error_symbol = nil) ⇒ SyntaxError
KwalifyError
76 77 78 79 80 |
# File 'lib/kwalify/errors.rb', line 76 def initialize(msg, linenum=nil, error_symbol=nil) super(linenum ? "line #{linenum}: #{msg}" : msg) @linenum = linenum @error_symbol = error_symbol end |
Instance Method Details
#message ⇒ Object
attr_accessor :linenum, :error_symbol
82 83 84 |
# File 'lib/kwalify/errors.rb', line 82 def "file: #{@filename}, line #{@linenum}: #{super}" end |