Sha256: a3543b8a9b39aaab7790c4c9ac3df69b488ca00df068dfd796a4ef1cf99d3457

Contents?: true

Size: 527 Bytes

Versions: 9

Compression:

Stored size: 527 Bytes

Contents

module CurrencyConverter
  # = Missing Exchange Rate
  #
  # Raised when the data for a supported currencies is +nil+ or +zero?+.
  class MissingExchangeRate < StandardError
    def initialize(from, to)
      super("Foreign exchange rate from #{from} to #{to} is missing.")
    end
  end

  # = Unknown Currency
  #
  # Raised when we try to grab data for an unsupported currency code.
  class UnknownCurrency < StandardError
    def initialize(currency_code)
      super("#{currency_code} is not supported.")
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
currency_converter-1.1.4 lib/currency_converter/exceptions.rb
currency_converter-1.1.3 lib/currency_converter/exceptions.rb
currency_converter-1.1.2 lib/currency_converter/exceptions.rb
currency_converter-1.1.1 lib/currency_converter/exceptions.rb
currency_converter-1.1.0 lib/currency_converter/exceptions.rb
currency_converter-1.0.2 lib/currency_converter/exceptions.rb
currency_converter-1.0.1 lib/currency_converter/exceptions.rb
currency_converter-1.0.0 lib/currency_converter/exceptions.rb
currency_converter-0.0.2 lib/currency_converter/exceptions.rb