Class UserException

  • All Implemented Interfaces:
    java.io.Serializable

    public class UserException
    extends java.lang.Exception
    An exception representing a user fixable problem in Command usage.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int exitCode
      The exist status the cli should use when catching this user error.
    • Constructor Summary

      Constructors 
      Constructor Description
      UserException​(int exitCode, java.lang.String msg)
      Constructs a UserException with an exit status and message to show the user.
      UserException​(int exitCode, java.lang.String msg, java.lang.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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • exitCode

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

      • UserException

        public UserException​(int exitCode,
                             java.lang.String msg)
        Constructs a UserException with an exit status and message to show the user.
      • UserException

        public UserException​(int exitCode,
                             java.lang.String msg,
                             java.lang.Throwable cause)
        Constructs a new user exception with specified exit status, message, and underlying cause.
        Parameters:
        exitCode - the exit code
        msg - the message
        cause - the underlying cause