UsageException (Apache Geode 2.0.2)
Description: declaration: package: org.apache.geode.modules.session.installer.args, class: UsageException

Package org.apache.geode.modules.session.installer.args

# Class UsageException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.apache.geode.modules.session.installer.args.UsageException

All Implemented Interfaces:
  `Serializable`

public class UsageException extends Exception
Invalid usage exception.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UsageException(String message)`
  Creates a new UsageException.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getUsage()`
  Returns the usage message previously set.
  `void`
  `setUsage(String usageText)`
  Attaches a usage message to the exception for later consumption.

  ### 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`

- ## Constructor Details

  - ### UsageException

    public UsageException(String message)
    Creates a new UsageException.
    Parameters:
      `message` - description of exceptional condition

- ## Method Details

  - ### setUsage

    public void setUsage(String usageText)
    Attaches a usage message to the exception for later consumption.
    Parameters:
      `usageText` - text to display to user to guide them to correct usage. This is generated and set by the `ArgsProcessor`.

  - ### getUsage

    public String getUsage()
    Returns the usage message previously set.
    Returns:
      message or null if not set.