uk.ac.starlink.hapi

## Class HapiServiceException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.io.IOException
      - - uk.ac.starlink.hapi.HapiServiceException

- All Implemented Interfaces:
    java.io.Serializable

      public class HapiServiceException
      extends java.io.IOException

  IOException subclass that is known to arise from a HAPI service error with a HAPI-specific status code.
  Since:
    26 Jan 2024
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CODE_TOOMUCH` HAPI status code for "Bad request - too much time or data requested".

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HapiServiceException(java.lang.String errMsg, int hapiCode)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getHapiCode()` Returns the HAPI error status code for this exception.

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

    - #### CODE_TOOMUCH

          public static final int CODE_TOOMUCH

      HAPI status code for "Bad request - too much time or data requested".
      See Also:
        HAPI 3.1.0 sec 4.2, Constant Field Values

  - ### Constructor Detail

    - #### HapiServiceException

          public HapiServiceException(java.lang.String errMsg,
                                      int hapiCode)

      Constructor.
      Parameters:
        `errMsg` - message for this exception
        `hapiCode` - HAPI protocol error status code

  - ### Method Detail

    - #### getHapiCode

          public int getHapiCode()

      Returns the HAPI error status code for this exception. Generally of the form 1xxx.
      Returns:
        HAPI status code