Interface ExceptionHandler

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface ExceptionHandler
    Functional interface to allow plugins to handle uncaught excetpions
    • Method Detail

      • execute

        boolean execute​(BaseCommand command,
                        RegisteredCommand registeredCommand,
                        CommandIssuer sender,
                        List<String> args,
                        Throwable t)
        Called when an exception occurs while executing a command
        If an exception handler properly handles an exception, the user will not be noticied by the framework that something went unexceptected.
        Parameters:
        command - the command that was executed
        registeredCommand - the registered command
        sender - the issuer who send the command
        args - the args he used
        t - the throwable that caused this exception
        Returns:
        if the exception was handeled by the exception handler.