Package com.uc4.api

Class InvalidUC4NameException

All Implemented Interfaces:
Serializable

public class InvalidUC4NameException extends RuntimeException
This runtime exception is thrown if the name of an object is invalid. The getInvalidName() method returns and the invalid name.
See Also:
  • Constructor Details

    • InvalidUC4NameException

      public InvalidUC4NameException(String invalidName)
      Constructs an InvalidUC4NameException using the specified name.
      Parameters:
      invalidName - name
    • InvalidUC4NameException

      public InvalidUC4NameException(String invalidName, String allowedCharacters, int maxLength)
      Constructs an InvalidUC4NameException using the specified name.
      Parameters:
      invalidName - name
      allowedCharacters - allowed characters, use empty string if all characters are allowed
      maxLength - maximal allowed length, use 0 if no length restriction is given
  • Method Details

    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable
    • getInvalidName

      public String getInvalidName()
      Returns the invalid name.
      Returns:
      name
    • getAllowedCharacters

      public String getAllowedCharacters()
      Returns the allowed characters. Empty if no restriction is set.
      Returns:
      allowed characters
    • getMaxLength

      public int getMaxLength()
      Returns the maximal allowed length of the name or zero if no restriction is set.
      Returns:
      length