Package com.tableau.hyperapi

# Class HyperException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.tableau.hyperapi.HyperException

All Implemented Interfaces:
  `Serializable`

public final class HyperException extends RuntimeException
Defines a `RuntimeException` object that is thrown on failure by the functions in the Hyper API Java library. `HyperException` is an unchecked exception.

See Also:
  - Serialized Form

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `HyperException.ContextId`
  A context id.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `HyperException`
  `getCause()`
  Returns the cause of the exception (if any).
  `HyperException.ContextId`
  `getContextId()`
  Returns the context id.
  `String`
  `getErrorMessage()`
  Deprecated.
  Use getMainMessage() instead.
  `String`
  `getHint()`
  Returns the hint message that was stored in the exception object.
  `String`
  `getMainMessage()`
  Returns the message that was stored in the exception object.
  `String`
  `getMessage()`
  Returns a detailed message string of this throwable.
  `String`
  `getSqlState()`
  EXPERIMENTAL

  ### Methods inherited from class java.lang.Throwable

  `addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### getCause

    public HyperException getCause()
    Returns the cause of the exception (if any).
    Overrides:
      `getCause` in class `Throwable`
    Returns:
      The cause, `null` if no cause.

  - ### getMainMessage

    public String getMainMessage()
    Returns the message that was stored in the exception object.

    Note that error messages may change in the future versions of the library.

    Returns:
      The message.

  - ### getErrorMessage

    @Deprecated public String getErrorMessage()
    Deprecated.
    Use getMainMessage() instead. This function will be removed in the future.
    Returns the message that was stored in the exception object.

    Note that error messages may change in the future versions of the library.

    Returns:
      The message.

  - ### getHint

    public String getHint()
    Returns the hint message that was stored in the exception object.
    Returns:
      The hint message.

  - ### getMessage

    public String getMessage()
    Returns a detailed message string of this throwable.

    This string contains message, hint and the context id of the error and of all of its causes.

    Overrides:
      `getMessage` in class `Throwable`
    Returns:
      The detailed message.

  - ### getContextId

    public HyperException.ContextId getContextId()
    Returns the context id.
    Returns:
      the context id.

  - ### getSqlState

    public String getSqlState()
    EXPERIMENTAL

    Return the SQL state associated with the error.

    Returns:
      The SQL state