Package org.spongepowered.api.util
Class ComponentMessageException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.spongepowered.api.util.ComponentMessageException
- All Implemented Interfaces:
 Serializable,ComponentMessageThrowable
- Direct Known Subclasses:
 CommandException
A subclass of Exception that contains a rich message that is an instance of
 
Component rather than a String. This allows formatted and localized
 exception messages.- See Also:
 
- 
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newComponentMessageException.ComponentMessageException(Throwable throwable) Constructs a newComponentMessageExceptionwith the given cause.ComponentMessageException(@Nullable Component message) Constructs a newComponentMessageExceptionwith the given message.ComponentMessageException(@Nullable Component message, Throwable throwable) Constructs a newComponentMessageExceptionwith the given message and cause. - 
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString 
- 
Constructor Details
- 
ComponentMessageException
public ComponentMessageException()Constructs a newComponentMessageException. - 
ComponentMessageException
Constructs a newComponentMessageExceptionwith the given message.- Parameters:
 message- The detail message
 - 
ComponentMessageException
Constructs a newComponentMessageExceptionwith the given message and cause.- Parameters:
 message- The detail messagethrowable- The cause
 - 
ComponentMessageException
Constructs a newComponentMessageExceptionwith the given cause.- Parameters:
 throwable- The cause
 
 - 
 - 
Method Details
- 
getMessage
- Overrides:
 getMessagein classThrowable
 - 
componentMessage
Returns the text message for this exception, or null if nothing is present.- Specified by:
 componentMessagein interfaceComponentMessageThrowable- Returns:
 - The text for this message
 
 - 
getLocalizedMessage
- Overrides:
 getLocalizedMessagein classThrowable
 
 -