In the unlikely event we conflict on a constant, it is nice to know
what name it has.
Change-Id: Ie775779c350e6621917d0212978f6aa2f28c32f3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
checkArgument(type != null, "Returning Type for Constant cannot be null!");
checkArgument(name != null, "Name of constant cannot be null!");
checkArgument(!containsConstant(name),
- "This generated type already contains constant with the same name.");
+ "This generated type already contains a \"%s\" constant", name);
final Constant constant = new ConstantImpl(this, type, name, value);
this.constants = LazyCollections.lazyAdd(this.constants, constant);