public final class SneakyException extends RuntimeException
Exception
, hiding them
from compiler checks.
The calling method should either:
throws
statement for the hidden exceptions
catch
@throws
.
Constructor and Description |
---|
SneakyException(Throwable throwable)
Rethrows
throwable , hiding it from compiler checks. |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public SneakyException(Throwable throwable)
throwable
, hiding it from compiler checks.
The calling method should either:
throws
statement for the hidden exceptions
catch
@throws
.
To hide IOException
s from compiler checks the usage of
UncheckedIOException
is highly recommended instead.
throwable
- throwable to be hiddenCopyright © 2025. All rights reserved.