Class ServerException

  • All Implemented Interfaces:
    java.io.Serializable

    public class ServerException
    extends java.lang.Exception
    ServerException is thrown if the analytics server has received the request but did not process the request due to some error. For example if authorization fails.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected ServerException​(int httpStatusCode, int errorCode, java.lang.String message)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getErrorCode()
      Returns the error code sent by the server.
      java.lang.String getErrorMessage()
      Returns the error message sent by the server.
      int getHttpStatusCode()
      The http status code for the request.
      java.lang.String toString()
      Returns the entire error details sent by the server.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ServerException

        protected ServerException​(int httpStatusCode,
                                  int errorCode,
                                  java.lang.String message)
    • Method Detail

      • getHttpStatusCode

        public int getHttpStatusCode()
        The http status code for the request.
        Returns:
        An int value.
      • getErrorCode

        public int getErrorCode()
        Returns the error code sent by the server.
        Returns:
        A int value.
      • getErrorMessage

        public java.lang.String getErrorMessage()
        Returns the error message sent by the server.
        Returns:
        A String value.
      • toString

        public java.lang.String toString()
        Returns the entire error details sent by the server.
        Overrides:
        toString in class java.lang.Throwable
        Returns:
        A String value.