Exception: Kiba::Extend::NonSymbolLookupOnError

Inherits:
TypeError
  • Object
show all
Includes:
ErrMod
Defined in:
lib/kiba/extend/error.rb

Overview

Exception raised if the lookup key value for the file is not a Symbol

Instance Method Summary collapse

Methods included from ErrMod

#calling_job, #info

Constructor Details

#initialize(filekey, for_job) ⇒ NonSymbolLookupOnError

Returns a new instance of NonSymbolLookupOnError.

Parameters:

  • filekey (Symbol)

    registry entry key having the non-symbol lookup_on value



106
107
108
109
110
111
112
113
# File 'lib/kiba/extend/error.rb', line 106

def initialize(filekey, for_job)
  @filekey = filekey
  @for_job = for_job
  @msg = "The `lookup_on` value in the registry entry hash for "\
    ":#{filekey} is not a Ruby Symbol. "\
    "Prepend a : to the field name to fix."
  super(msg)
end

Instance Method Details

#formattedObject



115
116
117
118
119
120
# File 'lib/kiba/extend/error.rb', line 115

def formatted
  <<~STR
    JOB FAILED: LOOKUP FILE SETUP ERROR FOR: #{for_job}
      #{msg}
  STR
end