Class LocalisedMessageException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.sgrewritten.stargate.exception.TranslatableException
org.sgrewritten.stargate.exception.LocalisedMessageException
- All Implemented Interfaces:
Serializable
Generic exception for any exception that can directly provide a localized message
- See Also:
-
Constructor Summary
ConstructorDescriptionLocalisedMessageException
(String localizedMessage) LocalisedMessageException
(String localizedMessage, @Nullable Portal portal, @Nullable MessageType messageType) -
Method Summary
Modifier and TypeMethodDescriptiongetLocalisedMessage
(LanguageManager manager) @Nullable MessageType
@Nullable Portal
protected TranslatableMessage
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
LocalisedMessageException
- Parameters:
localizedMessage
-The localized message of this exception
-
LocalisedMessageException
public LocalisedMessageException(String localizedMessage, @Nullable @Nullable Portal portal, @Nullable @Nullable MessageType messageType) - Parameters:
localizedMessage
-the localized message of this exception
portal
-The the portal of this exception
messageType
-The message type of this exception
-
-
Method Details
-
getTranslatableMessage
- Specified by:
getTranslatableMessage
in classTranslatableException
- Returns:
A translatable message that can be used to determine the localized message of this exception
-
getLocalisedMessage
- Overrides:
getLocalisedMessage
in classTranslatableException
- Parameters:
manager
-A language manager able to provide localized messages
- Returns:
The localized message of this exception
-
getPortal
- Returns:
The portal where this exception came from
-
getMessageType
- Returns:
The type of this localized message
-