Exception: Kiba::Extend::NoLookupOnError

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

Overview

Exception raised if FileRegistry contains no lookup key for file

Instance Method Summary collapse

Methods included from ErrMod

#calling_job, #info

Constructor Details

#initialize(filekey, for_job) ⇒ NoLookupOnError

Returns a new instance of NoLookupOnError.

Parameters:

  • filekey (Symbol)

    key not found in FileRegistry



80
81
82
83
84
85
86
# File 'lib/kiba/extend/error.rb', line 80

def initialize(filekey, for_job)
  @filekey = filekey
  @for_job = for_job
  msg = "No lookup_on value in registry entry hash for :#{filekey} -- "\
    "Used as lookup in job: :#{for_job})"
  super(msg)
end

Instance Method Details

#formattedObject



88
89
90
91
92
93
94
# File 'lib/kiba/extend/error.rb', line 88

def formatted
  <<~STR
    JOB FAILED: LOOKUP FILE SETUP ERROR FOR: #{for_job}
      To fix: Add `lookup_on` to registry entry hash for
        :#{filekey}
  STR
end