Package com.deviceatlas.exception
Class JsonException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.deviceatlas.exception.JsonException
- All Implemented Interfaces:
Serializable
The JsonException is thrown by the DetectionData class or the Api class when there is an error parsing the Json.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe data stored in the JSON cannot be used to build a valid DeviceAtlas data tree.static final intThe path to the JSON file that was given cannot be resolved.static final intThe JSON data you are using is too old for this API.static final intThe JSON file does not contain the Client Properties Section. -
Constructor Summary
ConstructorsConstructorDescriptionJsonException(int code, String message) JsonException(int code, String message, Throwable cause) -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
BAD_DATA
public static final int BAD_DATAThe data stored in the JSON cannot be used to build a valid DeviceAtlas data tree.- See Also:
-
JSON_VERSION
public static final int JSON_VERSIONThe JSON data you are using is too old for this API. Download a more recent version of the data.- See Also:
-
FILE_NOT_FOUND_ERROR
public static final int FILE_NOT_FOUND_ERRORThe path to the JSON file that was given cannot be resolved. Ensure you have supplied the correct path. Use an absolute pathname where you are unsure of the current working directory.- See Also:
-
NO_CLIENT_PROPERTIES_SECTION
public static final int NO_CLIENT_PROPERTIES_SECTIONThe JSON file does not contain the Client Properties Section. Ensure you have a valid JSON file.- See Also:
-
-
Constructor Details
-
JsonException
-
JsonException
-
-
Method Details
-
getCode
public int getCode()
-