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

tech.jhipster.lite.module.domain.InvalidJHipsterSlugException Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
package tech.jhipster.lite.module.domain;

import tech.jhipster.lite.shared.error.domain.GeneratorException;

class InvalidJHipsterSlugException extends GeneratorException {

  public InvalidJHipsterSlugException(String slug) {
    super(internalServerError(ModuleErrorKey.INVALID_SLUG).message(buildMessage(slug)).addParameter("slug", slug));
  }

  private static String buildMessage(String slug) {
    return new StringBuilder()
      .append("The slug \"")
      .append(slug)
      .append("\" is invalid (blank, bad format, ...). Slug should be only lower case letters, numbers and hyphens (-)")
      .toString();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy