Exception: NeuroHmmerApp::ENOENT

Inherits:
StandardError
  • Object
show all
Defined in:
lib/neurohmmerapp/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.

Direct Known Subclasses

BIN_DIR_NOT_FOUND

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(des, ent) ⇒ ENOENT

Returns a new instance of ENOENT.



43
44
45
46
# File 'lib/neurohmmerapp/exceptions.rb', line 43

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

Instance Attribute Details

#desObject (readonly)

Returns the value of attribute des.



48
49
50
# File 'lib/neurohmmerapp/exceptions.rb', line 48

def des
  @des
end

#entObject (readonly)

Returns the value of attribute ent.



48
49
50
# File 'lib/neurohmmerapp/exceptions.rb', line 48

def ent
  @ent
end

Instance Method Details

#to_sObject



50
51
52
# File 'lib/neurohmmerapp/exceptions.rb', line 50

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