Exception: Bioinform::ValidationError
- Defined in:
- lib/bioinform/errors.rb
Instance Attribute Summary collapse
-
#validation_errors ⇒ Object
readonly
Returns the value of attribute validation_errors.
Instance Method Summary collapse
-
#initialize(msg, options = {}) ⇒ ValidationError
constructor
A new instance of ValidationError.
- #to_s ⇒ Object
Constructor Details
#initialize(msg, options = {}) ⇒ ValidationError
Returns a new instance of ValidationError.
8 9 10 11 |
# File 'lib/bioinform/errors.rb', line 8 def initialize(msg, = {}) super(msg) @validation_errors = .fetch(:validation_errors, []) end |
Instance Attribute Details
#validation_errors ⇒ Object (readonly)
Returns the value of attribute validation_errors.
6 7 8 |
# File 'lib/bioinform/errors.rb', line 6 def validation_errors @validation_errors end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/bioinform/errors.rb', line 13 def to_s case @validation_errors when Array "#{super} (#{@validation_errors.join('; ')})" when ValidationResult "#{super}\n#{@validation_errors}" else "#{super} (#{@validation_errors})" end end |