Sha256: 6523497810b455627b7cf8f354185b988a81a50ddf926a21807dc5e04a9c6e65

Contents?: true

Size: 882 Bytes

Versions: 17

Compression:

Stored size: 882 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

17 entries across 17 versions & 1 rubygems

Version Path
finapps_core-2.0.20 lib/finapps_core/error.rb
finapps_core-2.0.19 lib/finapps_core/error.rb
finapps_core-2.0.18 lib/finapps_core/error.rb
finapps_core-2.0.17 lib/finapps_core/error.rb
finapps_core-2.0.16 lib/finapps_core/error.rb
finapps_core-2.0.15 lib/finapps_core/error.rb
finapps_core-2.0.14 lib/finapps_core/error.rb
finapps_core-2.0.13 lib/finapps_core/error.rb
finapps_core-2.0.12 lib/finapps_core/error.rb
finapps_core-2.0.11 lib/finapps_core/error.rb
finapps_core-2.0.10 lib/finapps_core/error.rb
finapps_core-2.0.9 lib/finapps_core/error.rb
finapps_core-2.0.8 lib/finapps_core/error.rb
finapps_core-2.0.7 lib/finapps_core/error.rb
finapps_core-2.0.6 lib/finapps_core/error.rb
finapps_core-2.0.5 lib/finapps_core/error.rb
finapps_core-2.0.4 lib/finapps_core/error.rb