class KXI::Exceptions::ParseException

Raised when parser encounters an error

Public Class Methods

new(parser, val) click to toggle source

Instantiates the {KXI::Exceptions::ParseException} class @param [string] parser Name of the parser @param [any] val Parsed value

Calls superclass method
# File lib/kxi/exceptions/parse_exception.rb, line 22
def initialize(parser, val)
        super("Failed to parse value '#{val.to_s}' as #{parser}!")
        @par = parser
        @val = val
end

Public Instance Methods

parser() click to toggle source

Gets the name of the parser @return [string] Name of the parser

# File lib/kxi/exceptions/parse_exception.rb, line 15
def parser
        @par
end
value() click to toggle source

Get the parsed value @return [any] Parsed value

# File lib/kxi/exceptions/parse_exception.rb, line 9
def value
        @val
end