Exception: OKF::Bundle::Search::UnsupportedQuery

Inherits:
Error
  • Object
show all
Defined in:
lib/okf/bundle/search.rb

Overview

Raised when the query needs something the engine cannot do — either the one that was named, or any that is available. Carries structured data rather than a finished sentence, because the shell says "--regexp" where the core says ":regexp"; the CLI formats it and exits 2.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(missing, engine: nil) ⇒ UnsupportedQuery

Returns a new instance of UnsupportedQuery.



27
28
29
30
31
# File 'lib/okf/bundle/search.rb', line 27

def initialize(missing, engine: nil)
  @missing = missing
  @engine = engine
  super(build_message(missing, engine))
end

Instance Attribute Details

#engineObject (readonly)

Returns the value of attribute engine.



25
26
27
# File 'lib/okf/bundle/search.rb', line 25

def engine
  @engine
end

#missingObject (readonly)

Returns the value of attribute missing.



25
26
27
# File 'lib/okf/bundle/search.rb', line 25

def missing
  @missing
end