Sha256: b7df3983b81711aae7e3128cc52f1af3e9216aad8bdc65a35dc342b426219cca

Contents?: true

Size: 494 Bytes

Versions: 2

Compression:

Stored size: 494 Bytes

Contents

# frozen_string_literal: true
module Karta
  # Basic class for exceptions in Karta
  class Error < StandardError; end

  # Exception for case when a mapper cannot be found
  class MapperNotFoundError < Error
    def initialize(from, to)
      super("no mapper found (#{from} → #{to})")
    end
  end

  # Exception for case when a mapper has an invalid name
  class InvalidNameError < Error
    def initialize
      super('mapper name must be on format [Foo]To[Bar]Mapper')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
karta-1.1.0 lib/karta/error.rb
karta-1.0.1 lib/karta/error.rb