public class InvalidEventHandlerException extends Exception
This exception class also provides a reusable static instance which is unmodifiable and does not contain any stack trace information. This reusable instance can be used for flow-control purposes such as signalling that an event handler should be removed from the event loop due to successful completion.
It is important to note that the reusable instance should not be used where error information or stack traces are needed, as it doesn't provide these details.
reusable(),
Serialized Form| Constructor and Description |
|---|
InvalidEventHandlerException()
Constructs a new exception with no detail message.
|
InvalidEventHandlerException(String message)
Constructs a new exception with the specified detail message.
|
InvalidEventHandlerException(Throwable cause)
Constructs a new exception with the specified cause.
|
| Modifier and Type | Method and Description |
|---|---|
static InvalidEventHandlerException |
reusable()
Returns a reusable, pre-created, InvalidEventHandlerException that is
unmodifiable and contains no stack trace.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic InvalidEventHandlerException(String message)
message - the detail messagepublic InvalidEventHandlerException()
public InvalidEventHandlerException(Throwable cause)
cause - the causepublic static InvalidEventHandlerException reusable()
This is useful for situations where throwing an InvalidEventHandlerException is used strictly for flow-control (e.g. removing an EventHandler from an EventLoop when the former has completed with no errors).
Note that this reusable instance contains no stack trace information and should not be used in scenarios where error information is necessary.
Copyright © 2024. All rights reserved.