public class

ServerException

extends ContentException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ com.neomades.content.ContentException
           ↳ com.neomades.content.network.ServerException

Class Overview

The server has sent a response that does not have a 2XX, 401 or 403 HTTP status code.

Summary

Public Constructors
ServerException(ContentQuery query)
Creates an error that means an error occurred in the server.
ServerException(ContentQuery query, NetworkResponse errorResponse)
Creates an error that means an error occurred in the server.
Public Methods
NetworkResponse getNetworkResponse()
ContentQuery getQuery()
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public ServerException (ContentQuery query)

Creates an error that means an error occurred in the server.

Parameters
query which query has failed with a server error.

public ServerException (ContentQuery query, NetworkResponse errorResponse)

Creates an error that means an error occurred in the server.

Parameters
query which query has failed with a server error.
errorResponse the response from the server

Public Methods

public NetworkResponse getNetworkResponse ()

Returns
  • the associated response if there is one or null

public ContentQuery getQuery ()

Returns
  • the original query