Exception: FakeDynamo::Error
- Inherits:
-
StandardError
- Object
- StandardError
- FakeDynamo::Error
- Defined in:
- lib/fake_dynamo/exceptions.rb
Direct Known Subclasses
ConditionalCheckFailedException, InvalidParameterValueException, ResourceInUseException, ResourceNotFoundException, UnknownOperationException, ValidationException
Instance Attribute Summary collapse
-
#detail ⇒ Object
readonly
Returns the value of attribute detail.
Instance Method Summary collapse
- #class_name ⇒ Object
-
#initialize(detail = '') ⇒ Error
constructor
A new instance of Error.
- #response ⇒ Object
- #status ⇒ Object
Constructor Details
#initialize(detail = '') ⇒ Error
Returns a new instance of Error.
11 12 13 14 |
# File 'lib/fake_dynamo/exceptions.rb', line 11 def initialize(detail='') @detail = detail super(detail) end |
Instance Attribute Details
#detail ⇒ Object (readonly)
Returns the value of attribute detail.
9 10 11 |
# File 'lib/fake_dynamo/exceptions.rb', line 9 def detail @detail end |
Instance Method Details
#class_name ⇒ Object
23 24 25 |
# File 'lib/fake_dynamo/exceptions.rb', line 23 def class_name self.class.name.split('::').last end |
#response ⇒ Object
16 17 18 19 20 21 |
# File 'lib/fake_dynamo/exceptions.rb', line 16 def response { '__type' => "#{self.class.type}##{class_name}", 'message' => "#{self.class.description}: #{@detail}" } end |
#status ⇒ Object
27 28 29 |
# File 'lib/fake_dynamo/exceptions.rb', line 27 def status self.class.status end |