Class UserException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.elasticsearch.cli.UserException
All Implemented Interfaces:
Serializable

public class UserException extends Exception
An exception representing a user fixable problem in Command usage.
See Also:
  • Field Details

    • exitCode

      public final int exitCode
      The exist status the cli should use when catching this user error.
  • Constructor Details

    • UserException

      public UserException(int exitCode, @Nullable String msg)
      Constructs a UserException with an exit status and message to show the user.

      To suppress cli output on error, supply a null message.

    • UserException

      public UserException(int exitCode, @Nullable String msg, Throwable cause)
      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 code
      msg - the message
      cause - the underlying cause