Package net.minestom.server.exception
Class ExceptionManager
java.lang.Object
net.minestom.server.exception.ExceptionManager
Manages the handling of exceptions.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the currentExceptionHandler
, can be the default one if none is defined.void
Handles an exception, if noExceptionHandler
is set, it just prints the stack trace.void
setExceptionHandler
(@Nullable ExceptionHandler exceptionHandler) Changes the exception handler, to allow custom exception handling.
-
Constructor Details
-
ExceptionManager
public ExceptionManager()
-
-
Method Details
-
handleException
Handles an exception, if noExceptionHandler
is set, it just prints the stack trace.- Parameters:
e
- the occurred exception
-
setExceptionHandler
Changes the exception handler, to allow custom exception handling.- Parameters:
exceptionHandler
- the newExceptionHandler
, can be set to null to apply the default provider
-
getExceptionHandler
Retrieves the currentExceptionHandler
, can be the default one if none is defined.- Returns:
- the current
ExceptionHandler
-