Class CommandExecutionException

  • All Implemented Interfaces:
    java.io.Serializable

    public class CommandExecutionException
    extends java.lang.IllegalArgumentException
    Exception thrown when there is an exception during execution of a command handler
    Since:
    1.2.0
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CommandExecutionException​(@NonNull java.lang.Throwable cause)
      Exception thrown when there is an exception during execution of a command handler
      CommandExecutionException​(@NonNull java.lang.Throwable cause, @Nullable CommandContext<?> commandContext)
      Exception thrown when there is an exception during execution of a command handler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @Nullable CommandContext<?> getCommandContext()
      Get the CommandContext which led to this exception
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • CommandExecutionException

        public CommandExecutionException​(@NonNull java.lang.Throwable cause)
        Exception thrown when there is an exception during execution of a command handler
        Parameters:
        cause - Exception thrown during the execution of a command handler
      • CommandExecutionException

        public CommandExecutionException​(@NonNull java.lang.Throwable cause,
                                         @Nullable CommandContext<?> commandContext)
        Exception thrown when there is an exception during execution of a command handler
        Parameters:
        cause - Exception thrown during the execution of a command handler
        commandContext - Command context
        Since:
        1.4.0
    • Method Detail

      • getCommandContext

        public @Nullable CommandContext<?> getCommandContext()
        Get the CommandContext which led to this exception
        Returns:
        Command
        Since:
        1.4.0