lib/aws-sdk-firehose/errors.rb in aws-sdk-firehose-1.24.0 vs lib/aws-sdk-firehose/errors.rb in aws-sdk-firehose-1.25.0
- old
+ new
@@ -4,10 +4,39 @@
# https://github.com/aws/aws-sdk-ruby/blob/master/CONTRIBUTING.md
#
# WARNING ABOUT GENERATED CODE
module Aws::Firehose
+
+ # When Firehose returns an error response, the Ruby SDK constructs and raises an error.
+ # These errors all extend Aws::Firehose::Errors::ServiceError < {Aws::Errors::ServiceError}
+ #
+ # You can rescue all Firehose errors using ServiceError:
+ #
+ # begin
+ # # do stuff
+ # rescue Aws::Firehose::Errors::ServiceError
+ # # rescues all Firehose 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
+ # * {ConcurrentModificationException}
+ # * {InvalidArgumentException}
+ # * {InvalidKMSResourceException}
+ # * {LimitExceededException}
+ # * {ResourceInUseException}
+ # * {ResourceNotFoundException}
+ # * {ServiceUnavailableException}
+ #
+ # 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 ConcurrentModificationException < ServiceError
@@ -21,11 +50,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class InvalidArgumentException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -37,11 +65,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class InvalidKMSResourceException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -58,11 +85,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class LimitExceededException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -74,11 +100,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class ResourceInUseException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -90,11 +115,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class ResourceNotFoundException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -106,11 +130,10 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
class ServiceUnavailableException < ServiceError
# @param [Seahorse::Client::RequestContext] context
@@ -122,10 +145,9 @@
# @return [String]
def message
@message || @data[:message]
end
-
end
end
end