public class ThrowingConsumerException extends RuntimeException
RuntimeException used to wrap exceptions
thrown by a ThrowingConsumer.
This exception allows checked exceptions to be propagated through the ThrowingConsumer interface, and can be used to handle or log the underlying exceptions as needed.
| Constructor and Description |
|---|
ThrowingConsumerException(Throwable cause)
Constructs a new ThrowingConsumerException with the specified cause.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringpublic ThrowingConsumerException(Throwable cause)
The cause is used to retain necessary information about the underlying exception that triggered this ThrowingConsumerException, making it available for further inspection or logging.
cause - the underlying cause (usually a checked exception thrown by the ThrowingConsumer)Copyright © 2024. All rights reserved.