XMM - Probabilistic Models for Motion Recognition and Mapping

Public Types | Public Member Functions | Private Attributes | List of all members
xmm::JsonException Class Reference

Exception class for handling JSON parsing errors. More...

#include <xmmJson.hpp>

Inheritance diagram for xmm::JsonException:
[legend]
Collaboration diagram for xmm::JsonException:
[legend]

Public Types

enum  JsonErrorType { JsonErrorType::JsonMissingNode, JsonErrorType::JsonTypeError, JsonErrorType::JsonValueError }
 Type of Json parsing errors. More...
 

Public Member Functions

 JsonException (JsonErrorType errorType, std::string nodename="")
 Default Constructor. More...
 
 JsonException (JsonException const &src, std::string nodename)
 Constructor From exception message. More...
 
 JsonException (JsonException const &src)
 Copy Constructor. More...
 
JsonExceptionoperator= (JsonException const &src)
 Assigment. More...
 
virtual const char * what () const throw ()
 Get exception message. More...
 

Private Attributes

JsonErrorType errorType_
 Type of Json Parsing Error. More...
 
std::vector< std::string > nodename_
 Name of the Json Node presenting an error. More...
 

Detailed Description

Exception class for handling JSON parsing errors.

Member Enumeration Documentation

Type of Json parsing errors.

Enumerator
JsonMissingNode 

A Node is Missing in the Json Value.

JsonTypeError 

The current node has wrong data type.

JsonValueError 

The current node has an inadmissible value.

Constructor & Destructor Documentation

xmm::JsonException::JsonException ( JsonErrorType  errorType,
std::string  nodename = "" 
)
inline

Default Constructor.

Parameters
errorTypetype of parsing error
nodenamename of the JSON node where the error occurred
xmm::JsonException::JsonException ( JsonException const &  src,
std::string  nodename 
)
inlineexplicit

Constructor From exception message.

Parameters
srcSource Exception
nodenamename of the
xmm::JsonException::JsonException ( JsonException const &  src)
inline

Copy Constructor.

Parameters
srcSource exception

Member Function Documentation

JsonException& xmm::JsonException::operator= ( JsonException const &  src)
inline

Assigment.

Parameters
srcSource exception
virtual const char* xmm::JsonException::what ( ) const
throw (
)
inlinevirtual

Get exception message.

Returns
exception message

Member Data Documentation

JsonErrorType xmm::JsonException::errorType_
private

Type of Json Parsing Error.

std::vector<std::string> xmm::JsonException::nodename_
private

Name of the Json Node presenting an error.


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