Exception: ROM::ElementNotFoundError

Inherits:
KeyError
  • Object
show all
Defined in:
core/lib/rom/constants.rb

Overview

Exception raised when an element inside a component registry is not found

Instance Method Summary collapse

Constructor Details

#initialize(key, registry) ⇒ ElementNotFoundError

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of ElementNotFoundError.



45
46
47
# File 'core/lib/rom/constants.rb', line 45

def initialize(key, registry)
  super(set_message(key, registry))
end

Instance Method Details

#set_message(key, registry) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



50
51
52
# File 'core/lib/rom/constants.rb', line 50

def set_message(key, registry)
  "#{key.inspect} doesn't exist in #{registry.type} registry"
end