Sha256: c50fe2b0c5fddd4f49c7dd0ee7c72b7bc7276f25d08f18cdceab2215873b0df9

Contents?: true

Size: 899 Bytes

Versions: 3

Compression:

Stored size: 899 Bytes

Contents

# frozen_string_literal: true

module Timezone
  # Error messages that can be raised by this gem. To catch any
  # related error message, use Error::Base.
  #
  #   begin
  #     ...
  #   rescue Timezone::Error::Base => e
  #     puts "Timezone Error: #{e.message}"
  #   end
  module Error
    # Top-level error. All other timezone errors subclass this one.
    class Base < StandardError; end

    # Indicates an invalid timezone name.
    class InvalidZone < Base; end

    # Indicates a lookup failure.
    class Lookup < Base; end

    # Indicates an error during lookup using the geonames API.
    class GeoNames < Lookup; end

    # Indicates an error during lookup using the google API.
    class Google < Lookup; end

    # Indicates a missing stub during a test lookup.
    class Test < Lookup; end

    # Indicates an invalid configuration.
    class InvalidConfig < Base; end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
timezone-1.3.28 lib/timezone/error.rb
timezone-1.3.27 lib/timezone/error.rb
timezone-1.3.26 lib/timezone/error.rb