All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.deepsense.neptune.clientlibrary.exceptions.common.DuplicatedEntityNameException Maven / Gradle / Ivy

There is a newer version: 1.6.1
Show newest version
/**
 * 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