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



111
112
113
114
115
116
117
118
# File 'lib/kiba/extend/error.rb', line 111

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



120
121
122
123
124
125
# File 'lib/kiba/extend/error.rb', line 120

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