Exception: ROM::ElementNotFoundError
- Inherits:
-
KeyError
- Object
- KeyError
- ROM::ElementNotFoundError
- Defined in:
- lib/rom/constants.rb
Overview
Exception raised when an element inside a component registry is not found
Instance Method Summary collapse
-
#initialize(key, registry = nil) ⇒ ElementNotFoundError
constructor
private
A new instance of ElementNotFoundError.
Constructor Details
#initialize(key, registry = nil) ⇒ 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.
83 84 85 86 87 88 89 90 91 |
# File 'lib/rom/constants.rb', line 83 def initialize(key, registry = nil) msg = if registry "#{key.inspect} doesn't exist in #{registry.type} registry" else "#{key} doesn't exist in the registry" end super(msg) end |