Class ApiException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.bandwidth.exceptions.ApiException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ApiErrorResponseException, GenericClientException, PathClientException

public class ApiException
extends java.lang.Exception
See Also:
Serialized Form
  • Constructor Summary

    Constructors 
    Constructor Description
    ApiException​(java.lang.String reason)
    Initialization constructor
    ApiException​(java.lang.String reason, HttpContext context)
    Initialization constructor
  • Method Summary

    Modifier and Type Method Description
    HttpContext getHttpContext()
    The HTTP response body from the API request
    int getResponseCode()
    The HTTP response code from the API request

    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 Details

    • ApiException

      public ApiException​(java.lang.String reason)
      Initialization constructor
      Parameters:
      reason - The reason for throwing exception
    • ApiException

      public ApiException​(java.lang.String reason, HttpContext context)
      Initialization constructor
      Parameters:
      reason - The reason for throwing exception
      context - The http context of the API exception
  • Method Details