lv.pasts.eme.tsp

## Class TSPException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - lv.pasts.eme.tsp.TSPException

- All Implemented Interfaces:
    Serializable

      public class TSPException
      extends Exception

  This exception is thrown by various methods in the `lv.pasts.eme.tsp` package.
  Since:
    1.3.0
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `REASON_REQUEST_FAILED` Exception is thrown when TimeStamp request failed.
    `static int` | `REASON_REQUEST_FORBIDDEN` Exception is thrown when TimeStamp request is forbidden.
    `static int` | `REASON_REQUEST_REJECTED` Exception is thrown when TimeStamp request is rejected.
    `static int` | `REASON_RESPONSE_INCONSISTENT` Exception is thrown when TimeStamp response does not math the request.
    `static int` | `REASON_RESPONSE_MALFORMED` Exception is thrown when TimeStamp response is malformed.
    `static int` | `REASON_TIMESTAMP_INVALID` Exception is thrown when TimeStamp is invalid.
    `static int` | `REASON_TIMESTAMP_SIGNATURE` Exception is thrown when TimeStamp signature is invalid.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TSPException(String message, int reason)`
    `TSPException(String message, Throwable cause, int reason)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getMessage()`
    `int` | `getReason()` Returns the reason code of this exception.

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

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, 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

    - #### REASON_TIMESTAMP_INVALID

          public static final int REASON_TIMESTAMP_INVALID

      Exception is thrown when TimeStamp is invalid.
      See Also:
        Constant Field Values

    - #### REASON_TIMESTAMP_SIGNATURE

          public static final int REASON_TIMESTAMP_SIGNATURE

      Exception is thrown when TimeStamp signature is invalid.
      See Also:
        Constant Field Values

    - #### REASON_RESPONSE_MALFORMED

          public static final int REASON_RESPONSE_MALFORMED

      Exception is thrown when TimeStamp response is malformed.
      See Also:
        Constant Field Values

    - #### REASON_RESPONSE_INCONSISTENT

          public static final int REASON_RESPONSE_INCONSISTENT

      Exception is thrown when TimeStamp response does not math the request.
      See Also:
        Constant Field Values

    - #### REASON_REQUEST_FAILED

          public static final int REASON_REQUEST_FAILED

      Exception is thrown when TimeStamp request failed.
      See Also:
        Constant Field Values

    - #### REASON_REQUEST_FORBIDDEN

          public static final int REASON_REQUEST_FORBIDDEN

      Exception is thrown when TimeStamp request is forbidden.
      See Also:
        Constant Field Values

    - #### REASON_REQUEST_REJECTED

          public static final int REASON_REQUEST_REJECTED

      Exception is thrown when TimeStamp request is rejected.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### TSPException

          public TSPException(String message,
                              int reason)

    - #### TSPException

          public TSPException(String message,
                              Throwable cause,
                              int reason)

  - ### Method Detail

    - #### getReason

          public int getReason()

      Returns the reason code of this exception.
      Returns:
        the reason code.
      Since:
        1.3.3

    - #### getMessage

          public String getMessage()

      Overrides:
        `getMessage` in class `Throwable`

Copyright VAS Latvijas Valsts radio un televizijas centrs / Developed by SIA EUSO