Class TranslatableException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.sgrewritten.stargate.exception.TranslatableException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BungeeNameException, InvalidNameException, LocalisedMessageException, NameConflictException, NameLengthException, UnimplementedFlagException

public abstract class TranslatableException extends Exception
See Also:
  • Constructor Details

    • TranslatableException

      protected TranslatableException(String message)
      Parameters:
      message -

      The message displayed in stack traces

  • Method Details

    • getTranslatableMessage

      protected abstract TranslatableMessage getTranslatableMessage()
      Returns:

      A translatable message that can be used to determine the localized message of this exception

    • getLocalisedMessage

      public String getLocalisedMessage(LanguageManager manager)
      Parameters:
      manager -

      A language manager able to provide localized messages

      Returns:

      The localized message of this exception