The DeviceAtlas DeviceApi documentation
Public Member Functions | Public Attributes | Properties | List of all members
Mobi.Mtld.DA.Exception.JsonException Class Reference

The JsonException is thrown by the Json class or the Api class when there is an error parsing the Json. More...

Inheritance diagram for Mobi.Mtld.DA.Exception.JsonException:

Public Member Functions

 JsonException (int code, string message)
 Constructs a JsonException instance with a code and human-readable message. More...
 

Public Attributes

const int BAD_DATA = 100
 The data stored in the JSON cannot be used to build a valid DeviceAtlas data tree. More...
 
const int JSON_VERSION = 200
 The JSON data you are using is too old for this API. Download a more recent version of the data. More...
 
const int FILE_NOT_FOUND_ERROR = 300
 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. More...
 
const int NO_CLIENT_PROPERTIES_SECTION = 400
 The JSON file does not contain the Client Properties Section. Ensure you have a valid JSON file. More...
 

Properties

virtual System.Exception Cause [get]
 Retrieves the throwable, which determines the nature/cause of the exception. More...
 
virtual int Code [get]
 Retrieves the exception code, which determines the nature/cause of the exception. More...
 

Detailed Description

The JsonException is thrown by the Json class or the Api class when there is an error parsing the Json.

Author
DeviceAtlas Limited

Constructor & Destructor Documentation

◆ JsonException()

Mobi.Mtld.DA.Exception.JsonException.JsonException ( int  code,
string  message 
)
inline

Constructs a JsonException instance with a code and human-readable message.

Parameters
codeThis should be a constant from this exception class.
messageDiagnostic message intended for human reading.

Member Data Documentation

◆ BAD_DATA

const int Mobi.Mtld.DA.Exception.JsonException.BAD_DATA = 100

The data stored in the JSON cannot be used to build a valid DeviceAtlas data tree.

◆ FILE_NOT_FOUND_ERROR

const int Mobi.Mtld.DA.Exception.JsonException.FILE_NOT_FOUND_ERROR = 300

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.

◆ JSON_VERSION

const int Mobi.Mtld.DA.Exception.JsonException.JSON_VERSION = 200

The JSON data you are using is too old for this API. Download a more recent version of the data.

◆ NO_CLIENT_PROPERTIES_SECTION

const int Mobi.Mtld.DA.Exception.JsonException.NO_CLIENT_PROPERTIES_SECTION = 400

The JSON file does not contain the Client Properties Section. Ensure you have a valid JSON file.

Property Documentation

◆ Cause

virtual System.Exception Mobi.Mtld.DA.Exception.JsonException.Cause
get

Retrieves the throwable, which determines the nature/cause of the exception.

Returns
Explanatory code.

◆ Code

virtual int Mobi.Mtld.DA.Exception.JsonException.Code
get

Retrieves the exception code, which determines the nature/cause of the exception.

Returns
Explanatory code.

The documentation for this class was generated from the following file: