Exception: Transcriptic::LabfileReadError
- Inherits:
-
TranscripticError
- Object
- StandardError
- TranscripticError
- Transcriptic::LabfileReadError
- Defined in:
- lib/transcriptic/errors.rb
Instance Method Summary collapse
-
#initialize(original_error) ⇒ LabfileReadError
constructor
A new instance of LabfileReadError.
- #status_code ⇒ Object
- #to_s ⇒ Object
Methods inherited from TranscripticError
Constructor Details
#initialize(original_error) ⇒ LabfileReadError
Returns a new instance of LabfileReadError.
13 14 15 |
# File 'lib/transcriptic/errors.rb', line 13 def initialize(original_error) @original_error = original_error end |
Instance Method Details
#status_code ⇒ Object
19 20 21 |
# File 'lib/transcriptic/errors.rb', line 19 def status_code @original_error.respond_to?(:status_code) ? @original_error.status_code : 113 end |
#to_s ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/transcriptic/errors.rb', line 23 def to_s [ "An error occurred while reading the Labfile:", "", " " + @original_error.to_s.split("\n").map(&:strip).join("\n "), ].join("\n") end |