Exception: Nodepile::InputColumnSpecs::InvalidRecordError
- Inherits:
-
StandardError
- Object
- StandardError
- Nodepile::InputColumnSpecs::InvalidRecordError
- Defined in:
- lib/nodepile/colspecs.rb
Instance Attribute Summary collapse
-
#file_path ⇒ Object
use to add error detail.
-
#rec_num ⇒ Object
use to add error detail.
Instance Method Summary collapse
-
#initialize(msg) ⇒ InvalidRecordError
constructor
A new instance of InvalidRecordError.
- #message ⇒ Object
Constructor Details
#initialize(msg) ⇒ InvalidRecordError
Returns a new instance of InvalidRecordError.
30 |
# File 'lib/nodepile/colspecs.rb', line 30 def initialize(msg) = @msg = msg |
Instance Attribute Details
#file_path ⇒ Object
use to add error detail
29 30 31 |
# File 'lib/nodepile/colspecs.rb', line 29 def file_path @file_path end |
#rec_num ⇒ Object
use to add error detail
29 30 31 |
# File 'lib/nodepile/colspecs.rb', line 29 def rec_num @rec_num end |
Instance Method Details
#message ⇒ Object
31 32 33 34 |
# File 'lib/nodepile/colspecs.rb', line 31 def prefix = "Nodepile parsing error at record [#{self.rec_num||'?'}] from source [#{self.file_path||'?'}]: " return (!self.rec_num.nil? || !self.file_path.nil?) ? (prefix + @msg) : @msg end |