Sha256: e10f223015ab5c5d63fea270203f8593fe0c0edda9287d1e336d75afcb205a2e

Contents?: true

Size: 336 Bytes

Versions: 3

Compression:

Stored size: 336 Bytes

Contents

module Bioinform
  class Error < ::StandardError
  end

  class ValidationError < Error
    attr_reader :validation_errors

    def initialize(msg, options = {})
      super(msg)
      @validation_errors = options.fetch(:validation_errors, [])
    end

    def to_s
      "#{super} (#{@validation_errors.join('; ')})"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bioinform-0.2.2 lib/bioinform/errors.rb
bioinform-0.2.1 lib/bioinform/errors.rb
bioinform-0.2.0 lib/bioinform/errors.rb