Exception: ActiveFacts::API::DuplicateIdentifyingValueException

Inherits:
RuntimeException show all
Defined in:
lib/activefacts/api/exceptions.rb

Instance Method Summary collapse

Constructor Details

#initialize(klass, role_name, value) ⇒ DuplicateIdentifyingValueException

Returns a new instance of DuplicateIdentifyingValueException.



85
86
87
88
89
# File 'lib/activefacts/api/exceptions.rb', line 85

def initialize(klass, role_name, value)
  super("Illegal attempt to assert #{klass.basename} having identifying value" +
        " (#{role_name} is #{value.verbalise})," +
        " when #{value.respond_to?(:related_entities) ? value.related_entities(false).map(&:verbalise).join(", ") : 'an equivalent entity'} already exists")
end