Sha256: cea10440325e5c2c4f71bee279e4721c40af3e2b16e33211711ebe71b0aa444a

Contents?: true

Size: 883 Bytes

Versions: 4

Compression:

Stored size: 883 Bytes

Contents

# frozen_string_literal: true

# Defines some errors to identify Exceptions within this gem
module FinAppsCore # :nodoc:
  # Base error class.
  class Error < StandardError; end

  # Raised for existing but invalid arguments.
  class InvalidArgumentsError < Error; end

  # Raised whenever a required argument is missing.
  class MissingArgumentsError < Error; end

  # Raised whenever there is a session timeout at the API.
  class ApiSessionTimeoutError < Error; end

  # Raised whenever the request specify an unsupported HTTP method.
  class UnsupportedHttpMethodError < Error; end

  # Raised whenever the connection fails.
  class ConnectionFailedError < Error; end

  %i[InvalidArgumentsError MissingArgumentsError ApiSessionTimeoutError
     UnsupportedHttpMethodError ConnectionFailedError].each do |const|
    Error.const_set(const, FinAppsCore.const_get(const))
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
finapps_core-4.0.4 lib/finapps_core/error.rb
finapps_core-4.0.3 lib/finapps_core/error.rb
finapps_core-4.0.2 lib/finapps_core/error.rb
finapps_core-4.0.0 lib/finapps_core/error.rb