TSPValidationException (Bouncy Castle Library 1.54 API Specification)
Date: 2015-12-29

org.bouncycastle.tsp

## Class TSPValidationException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - org.bouncycastle.tsp.TSPException
      - - org.bouncycastle.tsp.TSPValidationException

- All Implemented Interfaces:
    java.io.Serializable

      public class TSPValidationException
      extends TSPException

  Exception thrown if a TSP request or response fails to validate.

  If a failure code is associated with the exception it can be retrieved using the getFailureCode() method.

  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TSPValidationException(java.lang.String message)`
    `TSPValidationException(java.lang.String message, int failureCode)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getFailureCode()` Return the failure code associated with this exception - if one is set.

    - ### Methods inherited from class org.bouncycastle.tsp.TSPException

      `getCause, getUnderlyingException`

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

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

    - #### TSPValidationException

          public TSPValidationException(java.lang.String message)

    - #### TSPValidationException

          public TSPValidationException(java.lang.String message,
                                int failureCode)

  - ### Method Detail

    - #### getFailureCode

          public int getFailureCode()

      Return the failure code associated with this exception - if one is set.
      Returns:
        the failure code if set, -1 otherwise.