Exception: S33r::S3Exception::S3OriginatedException

Inherits:
Exception
  • Object
show all
Defined in:
lib/s33r/s33r_exception.rb

Overview

For errors originated by S3

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code = nil, message = nil) ⇒ S3OriginatedException

Returns a new instance of S3OriginatedException.



8
9
10
11
# File 'lib/s33r/s33r_exception.rb', line 8

def initialize(code=nil, message=nil)
  @s3_code = code
  @s3_message = message
end

Instance Attribute Details

#s3_codeObject (readonly)

Returns the value of attribute s3_code.



6
7
8
# File 'lib/s33r/s33r_exception.rb', line 6

def s3_code
  @s3_code
end

#s3_messageObject (readonly)

Returns the value of attribute s3_message.



6
7
8
# File 'lib/s33r/s33r_exception.rb', line 6

def s3_message
  @s3_message
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/s33r/s33r_exception.rb', line 13

def to_s
  "S3 returned an error\nError code: #{@s3_code}; error message: #{@s3_message}"
end