@InterfaceAudience.Public @InterfaceStability.Evolving public class ServiceStateException extends RuntimeException
Constructor and Description |
---|
ServiceStateException(String message) |
ServiceStateException(String message,
Throwable cause) |
ServiceStateException(Throwable cause) |
Modifier and Type | Method and Description |
---|---|
static RuntimeException |
convert(String text,
Throwable fault)
Convert any exception into a
RuntimeException . |
static RuntimeException |
convert(Throwable fault)
Convert any exception into a
RuntimeException . |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public ServiceStateException(String message)
public ServiceStateException(Throwable cause)
public static RuntimeException convert(Throwable fault)
RuntimeException
.
If the caught exception is already of that type, it is typecast to a
RuntimeException
and returned.
All other exception types are wrapped in a new instance of
ServiceStateExceptionfault
- exception or throwablepublic static RuntimeException convert(String text, Throwable fault)
RuntimeException
.
If the caught exception is already of that type, it is typecast to a
RuntimeException
and returned.
All other exception types are wrapped in a new instance of
ServiceStateExceptiontext
- text to use if a new exception is createdfault
- exception or throwableCopyright © 2017 Apache Software Foundation. All rights reserved.