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

public class ComponentMessageException extends Exception implements ComponentMessageThrowable
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 Details

    • ComponentMessageException

      public ComponentMessageException()
      Constructs a new ComponentMessageException.
    • ComponentMessageException

      public ComponentMessageException(@Nullable Component message)
      Constructs a new ComponentMessageException with the given message.
      Parameters:
      message - The detail message
    • ComponentMessageException

      public ComponentMessageException(@Nullable Component message, Throwable throwable)
      Constructs a new ComponentMessageException with the given message and cause.
      Parameters:
      message - The detail message
      throwable - The cause
    • ComponentMessageException

      public ComponentMessageException(Throwable throwable)
      Constructs a new ComponentMessageException with the given cause.
      Parameters:
      throwable - The cause
  • Method Details