Class InvalidChainException

All Implemented Interfaces:
Serializable

public class InvalidChainException extends CommandException
Exception type that is triggered when a command chain being invoked is not valid due to an incompatiblity between commands in the chain.
Since:
1.0
Version:
1.0
See Also:
  • Constructor Details

    • InvalidChainException

      public InvalidChainException(Command<?> command, Command<?> parent, String message)
      Creates a new instance.
      Parameters:
      command - The command that was being executed.
      parent - The ancestor that is incompatible.
      message - The error message.
  • Method Details

    • getCommand

      public Invocation getCommand()
      Retrieves the command that was being executed.
      Returns:
      The command that was being executed.
    • getParent

      public Invocation getParent()
      Retrieves the ancestor that is incompatible.
      Returns:
      The ancestor that is incompatible.
    • toString

      public String toString()
      Overrides:
      toString in class Throwable