Class JsonException

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.deviceatlas.exception.JsonException
All Implemented Interfaces:
Serializable

public class JsonException extends Exception
The JsonException is thrown by the DetectionData class or the Api class when there is an error parsing the Json.
See Also:
  • Field Details

    • BAD_DATA

      public static final int BAD_DATA
      The data stored in the JSON cannot be used to build a valid DeviceAtlas data tree.
      See Also:
    • JSON_VERSION

      public static final int JSON_VERSION
      The 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_ERROR
      The 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_SECTION
      The JSON file does not contain the Client Properties Section. Ensure you have a valid JSON file.
      See Also:
  • Constructor Details

    • JsonException

      public JsonException(int code, String message)
    • JsonException

      public JsonException(int code, String message, Throwable cause)
  • Method Details

    • getCode

      public int getCode()