Sha256: 699097b983a6e2240a7f3a74d7fe6236f4f74f27b31f11cc2b873ed6bb3ac929

Contents?: true

Size: 436 Bytes

Versions: 4

Compression:

Stored size: 436 Bytes

Contents

# frozen_string_literal: true

module AzureSTT
  #
  # Top level error for AzureSTT specific errors
  #
  class Error < StandardError
    attr_reader :code

    def initialize(code:, message:)
      @code = code
      super("#{message} (#{code})")
    end
  end

  #
  # Error raised when there is an error 400
  #
  class ServiceError < Error; end

  #
  # Error raised when there is an error 500
  #
  class NetError < Error; end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
azure_stt-0.3.0 lib/azure_stt/errors.rb
azure_stt-0.2.0 lib/azure_stt/errors.rb
azure_stt-0.1.1 lib/azure_stt/errors.rb
azure_stt-0.1.0 lib/azure_stt/errors.rb