Exception: GeneValidatorApp::ENOENT

Inherits:
StandardError
  • Object
show all
Defined in:
lib/genevalidatorapp/exceptions.rb

Overview

Name borrowed from standard Errno::ENOENT, this class serves as a template for defining errors that mean “expected to find <entity> at <path>, but didn’t”.

ENOENT is raised if and only if an entity was set, either using CLI or config file. For instance, it’s compulsory to set database_dir. But ENOENT is not raised if database_dir is not set. ENOENT is raised if database_dir was set, but does not exist.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(des, ent) ⇒ ENOENT



51
52
53
54
# File 'lib/genevalidatorapp/exceptions.rb', line 51

def initialize(des, ent)
  @des = des
  @ent = ent
end

Instance Attribute Details

#desObject (readonly)

Returns the value of attribute des.



56
57
58
# File 'lib/genevalidatorapp/exceptions.rb', line 56

def des
  @des
end

#entObject (readonly)

Returns the value of attribute ent.



56
57
58
# File 'lib/genevalidatorapp/exceptions.rb', line 56

def ent
  @ent
end

Instance Method Details

#to_sObject



58
59
60
# File 'lib/genevalidatorapp/exceptions.rb', line 58

def to_s
  "Could not find #{des}: #{ent}"
end