Exception: NliPipeline::SystemWrapper::CallWrapperError

Inherits:
StandardError
  • Object
show all
Includes:
AbstractUtil
Defined in:
lib/nli_pipeline/system_wrapper/call_wrapper_error.rb

Overview

handles errors for system calls

Class Method Summary collapse

Instance Method Summary collapse

Methods included from AbstractUtil

#add_attrs, #drop_forbidden_args_message, included, #init_with_attrs, #raise_unless_all, #to_s

Constructor Details

#initialize(**kwargs) ⇒ CallWrapperError

use StandardError::initialize to assign kwargs to output



25
26
27
28
# File 'lib/nli_pipeline/system_wrapper/call_wrapper_error.rb', line 25

def initialize(**kwargs)
  init_with_attrs(**kwargs)
  super("#{msg}:\n'#{call}'\nExited with code: #{code}")
end

Class Method Details

.required_argsArray[Symbol]



20
21
22
# File 'lib/nli_pipeline/system_wrapper/call_wrapper_error.rb', line 20

def self.required_args
  %i[call code]
end

.supported_argsHash

static methods required by NliPipeline::AbstractUtil::init_attrs

Returns:

  • (Hash)

See Also:



13
14
15
# File 'lib/nli_pipeline/system_wrapper/call_wrapper_error.rb', line 13

def self.supported_args
  { call: '', code: 0, msg: 'An error occurred during system call' }
end