JSON Voorhees
Killer JSON for C++
jsonv::validation_error Class Reference

Error thrown when an unrepresentable value is encountered in a JSON AST. More...

#include <jsonv/algorithm.hpp>

+ Inheritance diagram for jsonv::validation_error:

Public Types

enum  code { code::non_finite_number }
 Special code for describing the error encountered. More...
 

Public Member Functions

 validation_error (code code_, jsonv::path path_, jsonv::value value_)
 
code error_code () const
 Get the error code. More...
 
const jsonv::pathpath () const
 Get the path in the AST the error was found. More...
 
const jsonv::valuevalue () const
 Get the value that caused the error. More...
 

Detailed Description

Error thrown when an unrepresentable value is encountered in a JSON AST.

See also
validate

Definition at line 423 of file algorithm.hpp.

Member Enumeration Documentation

Special code for describing the error encountered.

Enumerator
non_finite_number 

Encountered a number which is NaN or Infinity.

Definition at line 428 of file algorithm.hpp.

Member Function Documentation

code jsonv::validation_error::error_code ( ) const

Get the error code.

const jsonv::path& jsonv::validation_error::path ( ) const

Get the path in the AST the error was found.

const jsonv::value& jsonv::validation_error::value ( ) const

Get the value that caused the error.


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