Exception: Rod::IdException

Inherits:
RodException show all
Defined in:
lib/rod/exception.rb

Overview

This exception is throw when an objects id is needed, but it is not yet stored in the database. The object might be accessed via object attribute of the exception.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from RodException

#to_s

Constructor Details

#initialize(message, object) ⇒ IdException

Returns a new instance of IdException.



67
68
69
70
# File 'lib/rod/exception.rb', line 67

def initialize(message,object)
  super("The object has not been stored in the DB.")
  @object = object
end

Instance Attribute Details

#objectObject (readonly)

Returns the value of attribute object.



65
66
67
# File 'lib/rod/exception.rb', line 65

def object
  @object
end