Sha256: 3bca6aeabd6012847fd43e546d266752487f608c5263a74e5e3f9fd322e05bdf
Contents?: true
Size: 1.37 KB
Versions: 6
Compression:
Stored size: 1.37 KB
Contents
module S33r module S3Exception # For errors originated by S3 class S3OriginatedException < Exception attr_reader :s3_code, :s3_message def initialize(code=nil, message=nil) @s3_code = code @s3_message = message end def to_s "S3 returned an error\nError code: #{@s3_code}; error message: #{@s3_message}" end end def self.error(s3_code, s3_message=nil) S3OriginatedException.new(s3_code, s3_message) end # Errors originated by S33r. class MethodNotAllowed < Exception end class MissingRequiredHeaders < Exception end class UnsupportedCannedACL < Exception end class MalformedBucketName < Exception end class InvalidBucket < Exception end class BucketListingMaxKeysError < Exception end class InvalidBucketListing < Exception end class InvalidGroupType < Exception end class InvalidPermission < Exception end # Raised if an attempt is made to generate an authenticated URL # with one of the required AWS keys missing. class KeysIncomplete < Exception end # Raised if a bucket cannot be used as a log target # (i.e. if LogDelivery permissions not set - see S33r::S3ACL::Policy.add_log_target_grants) class BucketNotLogTargetable < Exception end end end
Version data entries
6 entries across 6 versions & 1 rubygems