Class ApiException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ApiAuthException, ApiMappingException

public class ApiException extends RuntimeException
Base Sinch Client API exception
See Also:
  • Constructor Details

    • ApiException

      public ApiException()
      Constructs an ApiException with no detail message.
    • ApiException

      public ApiException(Throwable throwable)
      Constructs a new exception with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause). This constructor is useful for exceptions that are little more than wrappers for other throwables
      Parameters:
      throwable - Cause
    • ApiException

      public ApiException(String message)
      Constructs an ApiException with the specified detail message.
      Parameters:
      message - the detail message.
      Since:
      1.0
    • ApiException

      public ApiException(String message, Throwable throwable)
      Constructs an ApiException with the specified detail message and with the specified cause
      Parameters:
      message - The detail message
      throwable - Cause
    • ApiException

      public ApiException(String message, Throwable throwable, int code)
      Constructs an ApiException with the specified detail message, the specified cause and a code
      Parameters:
      message - The detail message
      throwable - Cause
      code - Code
    • ApiException

      public ApiException(int code, String message)
      Constructs an ApiException with the specified detail message and a code
      Parameters:
      code - Code
      message - The detail message
  • Method Details

    • getCode

      public int getCode()
      Get the HTTP status code.
      Returns:
      HTTP status code
    • toString

      public String toString()
      Overrides:
      toString in class Throwable