net.lenni0451.commandlib.utils.interfaces.CommandExceptionHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of CommandLib Show documentation
Show all versions of CommandLib Show documentation
A command lib with a simple and powerful API
The newest version!
package net.lenni0451.commandlib.utils.interfaces;
import net.lenni0451.commandlib.contexts.ExecutionContext;
import net.lenni0451.commandlib.exceptions.ArgumentParseException;
/**
* A functional interface to allow handling exceptions thrown when parsing arguments.
*
* @param The type of the executor
*/
@FunctionalInterface
public interface CommandExceptionHandler {
/**
* Handle the thrown exception.
*
* @param executor The executor
* @param t The thrown exception
* @throws ArgumentParseException If the exception should be handled as an invalid argument
* @throws RuntimeException If the exception should be handled as an internal error
*/
void handle(final ExecutionContext executor, final Exception t) throws ArgumentParseException, RuntimeException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy