Exception: NeuroHmmerApp::ENOENT
- Inherits:
-
StandardError
- Object
- StandardError
- NeuroHmmerApp::ENOENT
- 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
Instance Attribute Summary collapse
-
#des ⇒ Object
readonly
Returns the value of attribute des.
-
#ent ⇒ Object
readonly
Returns the value of attribute ent.
Instance Method Summary collapse
-
#initialize(des, ent) ⇒ ENOENT
constructor
A new instance of ENOENT.
- #to_s ⇒ Object
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
#des ⇒ Object (readonly)
Returns the value of attribute des.
48 49 50 |
# File 'lib/neurohmmerapp/exceptions.rb', line 48 def des @des end |
#ent ⇒ Object (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_s ⇒ Object
50 51 52 |
# File 'lib/neurohmmerapp/exceptions.rb', line 50 def to_s "Could not find #{des}: #{ent}" end |