Exception: Succubus::ParseError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/succubus.rb

Overview

Raised by Grammar.new if the grammar defined in the supplied block cannot be parsed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#errorsArray<String> (readonly)

Returns the errors encountered during parsing.

Returns:

  • (Array<String>)

    the errors encountered during parsing



12
13
14
15
16
17
18
19
# File 'lib/succubus.rb', line 12

class ParseError < RuntimeError
  attr_reader :errors

  # @private
  def set_errors(errors)
    @errors = errors
  end
end

Instance Method Details

#set_errors(errors) ⇒ Object



16
17
18
# File 'lib/succubus.rb', line 16

def set_errors(errors)
  @errors = errors
end