net.minestom.server.exception.ExceptionHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of minestom-snapshots Show documentation
Show all versions of minestom-snapshots Show documentation
1.20.4 Lightweight Minecraft server
package net.minestom.server.exception;
/**
* Used when you want to implement your own exception handling, instead of just printing the stack trace.
*
* Sets with {@link ExceptionManager#setExceptionHandler(ExceptionHandler)}.
*/
@FunctionalInterface
public interface ExceptionHandler {
/**
* Called when a exception was caught.
*
* @param e the thrown exception
*/
void handleException(Throwable e);
}