java.io.Serializable, ExitCodeProvider@Public @Evolving public class ServiceStateException extends java.lang.RuntimeException implements ExitCodeProvider
LauncherExitCodes.EXIT_SERVICE_LIFECYCLE_EXCEPTION.| Constructor | Description |
|---|---|
ServiceStateException(int exitCode,
java.lang.String message,
java.lang.Throwable cause) |
Instantiate, using the specified exit code as the exit code
of the exception, irrespetive of any exit code supplied by any inner
cause.
|
ServiceStateException(java.lang.String message) |
Instantiate
|
ServiceStateException(java.lang.String message,
java.lang.Throwable cause) |
Instantiate with a message and cause; if the cause has an exit code
then it is used, otherwise the generic
LauncherExitCodes.EXIT_SERVICE_LIFECYCLE_EXCEPTION exit code
is used. |
ServiceStateException(java.lang.Throwable cause) |
| Modifier and Type | Method | Description |
|---|---|---|
static java.lang.RuntimeException |
convert(java.lang.String text,
java.lang.Throwable fault) |
Convert any exception into a
RuntimeException. |
static java.lang.RuntimeException |
convert(java.lang.Throwable fault) |
Convert any exception into a
RuntimeException. |
int |
getExitCode() |
Method to get the exit code.
|
public ServiceStateException(java.lang.String message)
message - error messagepublic ServiceStateException(java.lang.String message,
java.lang.Throwable cause)
LauncherExitCodes.EXIT_SERVICE_LIFECYCLE_EXCEPTION exit code
is used.message - exception messagecause - optional inner causepublic ServiceStateException(int exitCode,
java.lang.String message,
java.lang.Throwable cause)
exitCode - exit code to declaremessage - exception messagecause - inner causepublic ServiceStateException(java.lang.Throwable cause)
public int getExitCode()
ExitCodeProvidergetExitCode in interface ExitCodeProviderpublic static java.lang.RuntimeException convert(java.lang.Throwable fault)
RuntimeException.
All other exception types are wrapped in a new instance of
ServiceStateException.fault - exception or throwableRuntimeException to rethrowpublic static java.lang.RuntimeException convert(java.lang.String text,
java.lang.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
ServiceStateException.text - text to use if a new exception is createdfault - exception or throwableRuntimeException to rethrowCopyright © 2008–2025 Apache Software Foundation. All rights reserved.