Exception: AppConfigFor::LoadError
- Defined in:
- lib/app_config_for/errors.rb
Overview
Raised when there was an issue parsing the configuration file.
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
The file that was being parsed.
-
#original_exception ⇒ Object
readonly
The original exception that signaled the parsing problme.
Instance Method Summary collapse
-
#initialize(file, original_exception) ⇒ LoadError
constructor
A new instance of LoadError.
Constructor Details
#initialize(file, original_exception) ⇒ LoadError
Returns a new instance of LoadError.
30 31 32 33 34 |
# File 'lib/app_config_for/errors.rb', line 30 def initialize(file, original_exception) @file = Pathname(file). @original_exception = original_exception super "Could not load configuration file: #{@file}\n#{@original_exception.}" end |
Instance Attribute Details
#file ⇒ Object (readonly)
The file that was being parsed.
25 26 27 |
# File 'lib/app_config_for/errors.rb', line 25 def file @file end |
#original_exception ⇒ Object (readonly)
The original exception that signaled the parsing problme. Most commonly this will be a Psych::SyntaxError
28 29 30 |
# File 'lib/app_config_for/errors.rb', line 28 def original_exception @original_exception end |