Class ServiceLaunchException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.hadoop.util.ExitUtil.ExitException
org.apache.hadoop.service.launcher.ServiceLaunchException
- All Implemented Interfaces:
Serializable,LauncherExitCodes,org.apache.hadoop.util.ExitCodeProvider
@Public
@Evolving
public class ServiceLaunchException
extends org.apache.hadoop.util.ExitUtil.ExitException
implements org.apache.hadoop.util.ExitCodeProvider, LauncherExitCodes
A service launch exception that includes an exit code.
When caught by the ServiceLauncher, it will convert that
into a process exit code.
The ServiceLaunchException(int, String, Object...) constructor
generates formatted exceptions.
- See Also:
-
Field Summary
Fields inherited from class org.apache.hadoop.util.ExitUtil.ExitException
statusFields inherited from interface org.apache.hadoop.service.launcher.LauncherExitCodes
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 Summary
ConstructorsConstructorDescriptionServiceLaunchException(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.ServiceLaunchException(int exitCode, Throwable cause, String format, Object... args) Create a formatted exception. -
Method Summary
Methods inherited from class org.apache.hadoop.util.ExitUtil.ExitException
getExitCode, toStringMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTraceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.util.ExitCodeProvider
getExitCode
-
Constructor Details
-
ServiceLaunchException
Create an exception with the specific exit code.- Parameters:
exitCode- exit codecause- cause of the exception
-
ServiceLaunchException
Create an exception with the specific exit code and text.- Parameters:
exitCode- exit codemessage- message to use in exception
-
ServiceLaunchException
Create a formatted exception.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.
- Parameters:
exitCode- exit codeformat- format for message to use in exceptionargs- list of arguments
-
ServiceLaunchException
Create a formatted exception.This uses
String.format(String, Object...)to build the formatted exception in the ENGLISH locale.- Parameters:
exitCode- exit codecause- inner causeformat- format for message to use in exceptionargs- list of arguments
-