@InterfaceAudience.Public @InterfaceStability.Evolving public class ServiceLaunchException extends org.apache.hadoop.util.ExitUtil.ExitException implements org.apache.hadoop.util.ExitCodeProvider, LauncherExitCodes
When caught by the ServiceLauncher, it will convert that
into a process exit code.
The ServiceLaunchException(int, String, Object...)
constructor
generates formatted exceptions.
EXIT_BAD_CONFIGURATION, EXIT_CLIENT_INITIATED_SHUTDOWN, EXIT_COMMAND_ARGUMENT_ERROR, EXIT_CONNECTIVITY_PROBLEM, EXIT_EXCEPTION_THROWN, EXIT_FAIL, EXIT_FORBIDDEN, EXIT_INTERRUPTED, EXIT_NOT_ACCEPTABLE, EXIT_NOT_FOUND, EXIT_OPERATION_NOT_ALLOWED, EXIT_OTHER_FAILURE, EXIT_SERVICE_CREATION_FAILURE, EXIT_SERVICE_LIFECYCLE_EXCEPTION, EXIT_SERVICE_UNAVAILABLE, EXIT_SUCCESS, EXIT_TASK_LAUNCH_FAILURE, EXIT_UNAUTHORIZED, EXIT_UNIMPLEMENTED, EXIT_UNSUPPORTED_VERSION, EXIT_USAGE
Constructor and Description |
---|
ServiceLaunchException(int exitCode,
String message)
Create an exception with the specific exit code and text.
|
ServiceLaunchException(int exitCode,
String format,
Object... args)
Create a formatted exception.
|
ServiceLaunchException(int exitCode,
Throwable cause)
Create an exception with the specific exit code.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
public ServiceLaunchException(int exitCode, Throwable cause)
exitCode
- exit codecause
- cause of the exceptionpublic ServiceLaunchException(int exitCode, String message)
exitCode
- exit codemessage
- message to use in exceptionpublic ServiceLaunchException(int exitCode, String format, Object... args)
This uses String.format(String, Object...)
to build the formatted exception in the ENGLISH locale.
If the last argument is a throwable, it becomes the cause of the exception. It will also be used as a parameter for the format.
exitCode
- exit codeformat
- format for message to use in exceptionargs
- list of argumentsCopyright © 2019 Apache Software Foundation. All rights reserved.