Exception: Cuprum::Collections::Queries::UnknownOperatorException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cuprum/collections/queries.rb

Overview

Exception raised when an invalid operator is referenced.

Instance Method Summary collapse

Constructor Details

#initialize(msg = nil, name = nil) ⇒ UnknownOperatorException

Returns a new instance of UnknownOperatorException.

Parameters:

  • msg (String) (defaults to: nil)

    the exception message.

  • name (String) (defaults to: nil)

    the name of the invalid operator.



31
32
33
34
35
# File 'lib/cuprum/collections/queries.rb', line 31

def initialize(msg = nil, name = nil)
  super(msg)

  @name = name
end

Instance Method Details

#nameString

Returns the name of the invalid operator.

Returns:

  • (String)

    the name of the invalid operator.



38
39
40
# File 'lib/cuprum/collections/queries.rb', line 38

def name
  @name || cause&.name
end