Sha256: b48b55b3201f70dea8a5bf2628e7aa60faaed3474bf505eb49cb179828209b3d

Contents?: true

Size: 1.47 KB

Versions: 9

Compression:

Stored size: 1.47 KB

Contents

# Copyright 2011 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
#     http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.

require 'aws/lazy_error_classes'
require 'aws/simple_db/client/xml'

module AWS
  class SimpleDB

    # This module contains exception classes for each of the error
    # types that SimpleDB can return.  You can use these classes to
    # rescue specific errors, for example:
    #
    #  begin
    #    SimpleDB.new.domains.mydomain.
    #      items["foo"].attributes.set(:color => "red")
    #  rescue SimpleDB::Errors::NoSuchDomain => e
    #    SimpleDB.new.domians.create("mydomain")
    #    retry
    #  end
    #
    # Each exception has:
    #
    # * +code+: returns the error code as a string.
    # * +box_usage+: returns the box usage for the operation.
    #
    # All errors raised as a result of error responses from the
    # service are instances of either {ClientError} or {ServerError}.
    # @private
    module Errors
      BASE_ERROR_GRAMMAR = Client::XML::BaseError
      include LazyErrorClasses
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
aws-sdk-1.1.3 lib/aws/simple_db/errors.rb
aws-sdk-1.1.2 lib/aws/simple_db/errors.rb
aws-sdk-1.1.1 lib/aws/simple_db/errors.rb
aws-sdk-1.1.0 lib/aws/simple_db/errors.rb
aws-sdk-1.0.4 lib/aws/simple_db/errors.rb
aws-sdk-1.0.3 lib/aws/simple_db/errors.rb
aws-sdk-1.0.2 lib/aws/simple_db/errors.rb
aws-sdk-1.0.1 lib/aws/simple_db/errors.rb
aws-sdk-1.0.0 lib/aws/simple_db/errors.rb