Exception: NliPipeline::SystemWrapper::ConfigError
- Inherits:
-
StandardError
- Object
- StandardError
- NliPipeline::SystemWrapper::ConfigError
- Includes:
- AbstractUtil
- Defined in:
- lib/nli_pipeline/system_wrapper/config_error.rb
Overview
handles errors for config
Instance Attribute Summary collapse
-
#error_message ⇒ Object
readonly
Returns the value of attribute error_message.
Class Method Summary collapse
- .required_args ⇒ Array[Symbol]
-
.supported_args ⇒ Hash
static methods required by NliPipeline::AbstractUtil::init_attrs.
Instance Method Summary collapse
-
#initialize(**kwargs) ⇒ ConfigError
constructor
wrap up kwargs into single variable error_message.
-
#to_s ⇒ String
override to_s from AbstractUtil return single line summary of error.
Methods included from AbstractUtil
#add_attrs, #drop_forbidden_args_message, included, #init_with_attrs, #raise_unless_all
Constructor Details
#initialize(**kwargs) ⇒ ConfigError
wrap up kwargs into single variable error_message
34 35 36 37 38 39 40 |
# File 'lib/nli_pipeline/system_wrapper/config_error.rb', line 34 def initialize(**kwargs) init_with_attrs(**kwargs) = "#{@msg}: #{@config}" += " in #{@file}" if file @error_message = super() end |
Instance Attribute Details
#error_message ⇒ Object (readonly)
Returns the value of attribute error_message.
7 8 9 |
# File 'lib/nli_pipeline/system_wrapper/config_error.rb', line 7 def @error_message end |
Class Method Details
.required_args ⇒ Array[Symbol]
22 23 24 |
# File 'lib/nli_pipeline/system_wrapper/config_error.rb', line 22 def self.required_args [:config] end |
.supported_args ⇒ Hash
static methods required by NliPipeline::AbstractUtil::init_attrs
15 16 17 |
# File 'lib/nli_pipeline/system_wrapper/config_error.rb', line 15 def self.supported_args { config: {}, msg: 'Config Error', file: false } end |
Instance Method Details
#to_s ⇒ String
override to_s from AbstractUtil return single line summary of error
29 30 31 |
# File 'lib/nli_pipeline/system_wrapper/config_error.rb', line 29 def to_s @error_message end |