Sha256: e457930376e1b34bd3da13b5fcda3486a554c83bc788b501f21023aa16f3d65f

Contents?: true

Size: 1.27 KB

Versions: 3

Compression:

Stored size: 1.27 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/s3/client/xml'

module AWS
  class S3

    # This module contains exception classes for each of the error
    # types that S3 can return.  You can use these classes to rescue
    # specific errors, for example:
    #
    #  begin
    #    S3.new.buckets.mybucket.
    #      objects.myobj.write("HELLO")
    #  rescue S3::Errors::NoSuchBucket => e
    #    S3.new.buckets.create("mybucket")
    #    retry
    #  end
    #
    # 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::Error

      include LazyErrorClasses

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
aws-sdk-1.0.2 lib/aws/s3/errors.rb
aws-sdk-1.0.1 lib/aws/s3/errors.rb
aws-sdk-1.0.0 lib/aws/s3/errors.rb