Exception: Taxonomite::CircularRelation
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Taxonomite::CircularRelation
- Extended by:
- CreateClassMethod
- Defined in:
- lib/taxonomite/exceptions.rb
Instance Method Summary collapse
-
#initialize(msg = "Circular relation in attempt to add Taxonomite::Node.", parent = nil, child = nil) ⇒ CircularRelation
constructor
A new instance of CircularRelation.
Methods included from CreateClassMethod
Constructor Details
#initialize(msg = "Circular relation in attempt to add Taxonomite::Node.", parent = nil, child = nil) ⇒ CircularRelation
Returns a new instance of CircularRelation.
38 39 40 41 42 43 |
# File 'lib/taxonomite/exceptions.rb', line 38 def initialize(msg = "Circular relation in attempt to add Taxonomite::Node.", parent = nil, child = nil) msg = "Circular reference in adding " + ( child.nil? ? "nil child" : "#{child.name} (#{child.entity_type})" ) + " as child of #{parent.name} (#{parent.entity_type})" unless parent.nil? super(msg) end |