io.deepsense.neptune.clientlibrary.exceptions.common.DuplicatedEntityNameException Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of neptune-client-library Show documentation
Show all versions of neptune-client-library Show documentation
Enables integration with Neptune in your Java code
/**
* Copyright (c) 2016, CodiLime Inc.
*/
package io.deepsense.neptune.clientlibrary.exceptions.common;
import static io.deepsense.neptune.clientlibrary.exceptions.utils.ExceptionMessageUtils.capitalizedEntityClassName;
import static io.deepsense.neptune.clientlibrary.exceptions.utils.ExceptionMessageUtils.lowercasePluralEntityClassName;
public abstract class DuplicatedEntityNameException extends NeptuneRuntimeException {
public DuplicatedEntityNameException(String entityClassName, String name) {
super(String.format(
"Names of %s must be unique. %s \"%s\" already exists!",
lowercasePluralEntityClassName(entityClassName),
capitalizedEntityClassName(entityClassName),
name));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy