Package org.elasticsearch.cli
Class UserException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.elasticsearch.cli.UserException
- All Implemented Interfaces:
Serializable
An exception representing a user fixable problem in
Command
usage.- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionfinal int
The exist status the cli should use when catching this user error. -
Constructor Summary
ConstructorDescriptionUserException
(int exitCode, String msg) Constructs a UserException with an exit status and message to show the user.UserException
(int exitCode, String msg, Throwable cause) Constructs a new user exception with specified exit status, message, and underlying cause. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
exitCode
public final int exitCodeThe exist status the cli should use when catching this user error.
-
-
Constructor Details
-
UserException
Constructs a UserException with an exit status and message to show the user.To suppress cli output on error, supply a null message.
-
UserException
Constructs a new user exception with specified exit status, message, and underlying cause.To suppress cli output on error, supply a null message.
- Parameters:
exitCode
- the exit codemsg
- the messagecause
- the underlying cause
-