Exception: Kwalify::SyntaxError

Inherits:
BaseError show all
Defined in:
lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/errors.rb

Overview

syntax error for YAML and JSON

Direct Known Subclasses

YamlSyntaxError

Instance Attribute Summary

Attributes inherited from BaseError

#column, #error_symbol, #filename, #linenum, #path, #rule, #value

Instance Method Summary collapse

Methods inherited from BaseError

#<=>, #_to_s, #to_s

Constructor Details

#initialize(msg, linenum = nil, error_symbol = nil) ⇒ SyntaxError

KwalifyError



76
77
78
79
80
# File 'lib/tpkg/thirdparty/kwalify-0.7.2/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

#messageObject

attr_accessor :linenum, :error_symbol



82
83
84
# File 'lib/tpkg/thirdparty/kwalify-0.7.2/lib/kwalify/errors.rb', line 82

def message
  "file: #{@filename}, line #{@linenum}: #{super}"
end