Class ExceptionManager

java.lang.Object
net.minestom.server.exception.ExceptionManager

public final class ExceptionManager extends Object
Manages the handling of exceptions.
  • Constructor Details

    • ExceptionManager

      public ExceptionManager()
  • Method Details

    • handleException

      public void handleException(Throwable e)
      Handles an exception, if no ExceptionHandler is set, it just prints the stack trace.
      Parameters:
      e - the occurred exception
    • setExceptionHandler

      public void setExceptionHandler(@Nullable @Nullable ExceptionHandler exceptionHandler)
      Changes the exception handler, to allow custom exception handling.
      Parameters:
      exceptionHandler - the new ExceptionHandler, can be set to null to apply the default provider
    • getExceptionHandler

      public ExceptionHandler getExceptionHandler()
      Retrieves the current ExceptionHandler, can be the default one if none is defined.
      Returns:
      the current ExceptionHandler