Package revxrsal.commands.exception
Interface CommandExceptionHandler
- All Known Implementing Classes:
BukkitExceptionAdapter
,BungeeExceptionAdapter
,CommandExceptionAdapter
,DefaultExceptionHandler
,JDAExceptionAdapter
,SpongeExceptionAdapter
,VelocityExceptionAdapter
public interface CommandExceptionHandler
A handler for all exceptions that may be thrown during the command
invocation.
Exceptions may be anything, including Java's normal exceptions, and build-in ones thrown by different components in the framework.
Set with CommandHandler.setExceptionHandler(CommandExceptionHandler)
.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
handleException
(@NotNull Throwable throwable, @NotNull CommandActor actor) Handles the given exception.
-
Method Details
-
handleException
Handles the given exception. Note that this method does not provide information about the command context (such as the command, etc.) These are available in individual exceptions and can be accessed only if the thrown exception exposes them.- Parameters:
throwable
- Exception to handleactor
- The command actor
-