com.versionone.apiclient.exceptions

## Class ConnectionException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - com.versionone.apiclient.exceptions.V1Exception
      - - com.versionone.apiclient.exceptions.ConnectionException

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    SecurityException

      public class ConnectionException
      extends V1Exception

  Exception thrown for connection errors
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConnectionException(String message)` Create with message
    `ConnectionException(String message, Exception inner)` Create with message and inner exception.
    `ConnectionException(String message, int responseCode)` Create with message
    `ConnectionException(String message, int responseCode, Exception inner)` Create with message and inner exception and response code

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getServerResponseCode()` Return the response code the server returned

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

    - #### ConnectionException

          public ConnectionException(String message,
                                     int responseCode)

      Create with message
      Parameters:
        `message` - - text message for user
        `responseCode` - - server response code

    - #### ConnectionException

          public ConnectionException(String message,
                                     int responseCode,
                                     Exception inner)

      Create with message and inner exception and response code
      Parameters:
        `message` - - text message for user
        `responseCode` - - server response code
        `inner` - - nested exception

    - #### ConnectionException

          public ConnectionException(String message,
                                     Exception inner)

      Create with message and inner exception. This case sets response code to -1.
      Parameters:
        `message` - text of error
        `inner` - inner exception

    - #### ConnectionException

          public ConnectionException(String message)

      Create with message
      Parameters:
        `message` - text of error

  - ### Method Detail

    - #### getServerResponseCode

          public int getServerResponseCode()

      Return the response code the server returned
      Returns:
        response code

Copyright © 2021 VersionOne, Inc.. All rights reserved.