Class: Blinkist::Config::ErrorHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/blinkist/config/error_handlers/error_handler.rb

Direct Known Subclasses

ProductionOnlyErrorHandler

Instance Method Summary collapse

Constructor Details

#initialize(env, app_name) ⇒ ErrorHandler

Returns a new instance of ErrorHandler.



4
5
6
7
# File 'lib/blinkist/config/error_handlers/error_handler.rb', line 4

def initialize(env, app_name)
  @env = env
  @app_name = app_name
end

Instance Method Details

#call(key, scope) ⇒ Object

Raises:



9
10
11
# File 'lib/blinkist/config/error_handlers/error_handler.rb', line 9

def call(key, scope)
  raise ValueMissingError, "Missing value for #{key} in the scope: #{scope || '<default>'} (Please check the configuration for missing keys)"
end