Exception: Ferret::QueryParser::QueryParseException

Inherits:
Exception
  • Object
show all
Defined in:
lib/ferret/query_parser.rb

Overview

The exception thrown when there is an error parsing the query string. This also holds the Racc::ParseError that was thrown in case you want to investigate why a query won’t parse.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(error, parse_error) ⇒ QueryParseException

Create a new QueryParseException

error

An error string describing the query that failed

parse_error

The actual parse error that was thrown by Racc. It is a Racc::ParseError object.



303
304
305
306
# File 'lib/ferret/query_parser.rb', line 303

def initialize(error, parse_error)
  super(error)
  @parse_error = parse_error
end

Instance Attribute Details

#parse_errorObject (readonly)

Returns the value of attribute parse_error.



296
297
298
# File 'lib/ferret/query_parser.rb', line 296

def parse_error
  @parse_error
end