lib/aws-sdk-autoscaling/errors.rb in aws-sdk-autoscaling-1.32.0 vs lib/aws-sdk-autoscaling/errors.rb in aws-sdk-autoscaling-1.33.0

- old
+ new

@@ -4,10 +4,39 @@ # https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md # # WARNING ABOUT GENERATED CODE module Aws::AutoScaling + + # When AutoScaling returns an error response, the Ruby SDK constructs and raises an error. + # These errors all extend Aws::AutoScaling::Errors::ServiceError < {Aws::Errors::ServiceError} + # + # You can rescue all AutoScaling errors using ServiceError: + # + # begin + # # do stuff + # rescue Aws::AutoScaling::Errors::ServiceError + # # rescues all AutoScaling API errors + # end + # + # + # ## Request Context + # ServiceError objects have a {Aws::Errors::ServiceError#context #context} method that returns + # information about the request that generated the error. + # See {Seahorse::Client::RequestContext} for more information. + # + # ## Error Classes + # * {AlreadyExistsFault} + # * {InvalidNextToken} + # * {LimitExceededFault} + # * {ResourceContentionFault} + # * {ResourceInUseFault} + # * {ScalingActivityInProgressFault} + # * {ServiceLinkedRoleFailure} + # + # Additionally, error classes are dynamically generated for service errors based on the error code + # if they are not defined above. module Errors extend Aws::Errors::DynamicErrors class AlreadyExistsFault < ServiceError @@ -21,11 +50,10 @@ # @return [String] def message @message || @data[:message] end - end class InvalidNextToken < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -37,11 +65,10 @@ # @return [String] def message @message || @data[:message] end - end class LimitExceededFault < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -53,11 +80,10 @@ # @return [String] def message @message || @data[:message] end - end class ResourceContentionFault < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -69,11 +95,10 @@ # @return [String] def message @message || @data[:message] end - end class ResourceInUseFault < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -85,11 +110,10 @@ # @return [String] def message @message || @data[:message] end - end class ScalingActivityInProgressFault < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -101,11 +125,10 @@ # @return [String] def message @message || @data[:message] end - end class ServiceLinkedRoleFailure < ServiceError # @param [Seahorse::Client::RequestContext] context @@ -117,10 +140,9 @@ # @return [String] def message @message || @data[:message] end - end end end