Sha256: 27004195f9f4064ebf90133acb73a1f38c63fdb75786bacb5a25d9ad38b02f00

Contents?: true

Size: 458 Bytes

Versions: 8

Compression:

Stored size: 458 Bytes

Contents

module Carload
  class Error < StandardError
    attr_reader :message
  end

  class UnmanagedModelError < Error
    def initialize data
      @message = I18n.t('carload.error.message.unmanaged_model', model: data)
    end
  end

  class UnsupportedError < Error
    def initialize data
      @message = "Carload does not support #{data} currently."
    end
  end

  class InvalidError < Error
    def initialize data
      @message = data
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
carload-0.5.3 lib/carload/exceptions.rb
carload-0.5.2 lib/carload/exceptions.rb
carload-0.5.1 lib/carload/exceptions.rb
carload-0.5.0 lib/carload/exceptions.rb
carload-0.4.5 lib/carload/exceptions.rb
carload-0.4.4 lib/carload/exceptions.rb
carload-0.4.3 lib/carload/exceptions.rb
carload-0.4.2 lib/carload/exceptions.rb