Exception: AppConfigFor::ConfigNotFound
- Defined in:
- lib/app_config_for/errors.rb
Overview
Raised when the configuration could not be found.
Instance Attribute Summary collapse
-
#locations_searched ⇒ Object
readonly
The full path of every place the configuration file was looked for.
-
#original_exception ⇒ Object
readonly
The underlying SystemCallError that signaled the missing file.
Instance Method Summary collapse
-
#initialize(locations, original_exception) ⇒ ConfigNotFound
constructor
A new instance of ConfigNotFound.
Constructor Details
#initialize(locations, original_exception) ⇒ ConfigNotFound
Returns a new instance of ConfigNotFound.
14 15 16 17 18 |
# File 'lib/app_config_for/errors.rb', line 14 def initialize(locations, original_exception) @locations_searched = Array(locations).map { |x| Pathname(x). } @original_exception = original_exception super "Could not locate configuration at: #{@locations_searched.join(' or ')}" end |
Instance Attribute Details
#locations_searched ⇒ Object (readonly)
The full path of every place the configuration file was looked for.
9 10 11 |
# File 'lib/app_config_for/errors.rb', line 9 def locations_searched @locations_searched end |
#original_exception ⇒ Object (readonly)
The underlying SystemCallError that signaled the missing file. Most commonly this will be Errno::ENOENT
.
12 13 14 |
# File 'lib/app_config_for/errors.rb', line 12 def original_exception @original_exception end |