Sha256: 7895bcd4834bb202db4196b6be9e3e7d9cea6b1b4965e775312b9f7711a4c626

Contents?: true

Size: 1.53 KB

Versions: 1190

Compression:

Stored size: 1.53 KB

Contents

module Aws
  module Waiters
    module Errors

      # Raised when a waiter detects a condition where the waiter can never
      # succeed.
      class WaiterFailed < StandardError; end

      class FailureStateError < WaiterFailed

        MSG = "stopped waiting, encountered a failure state"

        def initialize(response)
          @response = response
          super(MSG)
        end

        # @return [Seahorse::Client::Response] The response that matched
        #   the failure state.
        attr_reader :response

      end

      class TooManyAttemptsError < WaiterFailed

        MSG = "stopped waiting after %d attempts without success"

        def initialize(attempts)
          @attempts = attempts
          super(MSG % [attempts])
        end

        # @return [Integer]
        attr_reader :attempts

      end

      class UnexpectedError < WaiterFailed

        MSG = "stopped waiting due to an unexpected error: %s"

        def initialize(error)
          @error = error
          super(MSG % [error.message])
        end

        # @return [Exception] The unexpected error.
        attr_reader :error

      end

      # Raised when attempting to get a waiter by name and the waiter has not
      # been defined.
      class NoSuchWaiterError < ArgumentError

        MSG = "no such waiter %s; valid waiter names are: %s"

        def initialize(waiter_name, waiter_names)
          waiter_names = waiter_names.map(&:inspect).join(', ')
          super(MSG % [waiter_name.inspect, waiter_names])
        end

      end
    end
  end
end

Version data entries

1,190 entries across 1,190 versions & 2 rubygems

Version Path
aws-sdk-core-2.11.592 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.591 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.590 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.589 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.588 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.587 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.586 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.585 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.584 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.583 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.582 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.581 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.580 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.579 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.578 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.577 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.576 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.575 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.574 lib/aws-sdk-core/waiters/errors.rb
aws-sdk-core-2.11.573 lib/aws-sdk-core/waiters/errors.rb