slot 0.0.1
A real time UI render framework
载入中...
搜索中...
未找到
静态 Public 成员函数 | Public 属性 | Private 成员函数 | 静态 Private 成员函数 | 所有成员列表
detail::parse_error类 参考

exception indicating a parse error 更多...

#include <json.hpp>

类 detail::parse_error 继承关系图:
Inheritance graph
[图例]
detail::parse_error 的协作图:
Collaboration graph
[图例]

静态 Public 成员函数

template<typename BasicJsonContext , enable_if_t< is_basic_json_context< BasicJsonContext >::value, int > = 0>
static parse_error create (int id_, const position_t &pos, const std::string &what_arg, BasicJsonContext context)
 create a parse error exception
 
template<typename BasicJsonContext , enable_if_t< is_basic_json_context< BasicJsonContext >::value, int > = 0>
static parse_error create (int id_, std::size_t byte_, const std::string &what_arg, BasicJsonContext context)
 

Public 属性

const std::size_t byte
 byte index of the parse error
 
- Public 属性 继承自 detail::exception
const int id
 the id of the exception
 

Private 成员函数

 parse_error (int id_, std::size_t byte_, const char *what_arg)
 

静态 Private 成员函数

static std::string position_string (const position_t &pos)
 

额外继承的成员函数

- Public 成员函数 继承自 detail::exception
const charwhat () const noexcept override
 returns the explanatory string
 
- Protected 成员函数 继承自 detail::exception
 exception (int id_, const char *what_arg)
 
- 静态 Protected 成员函数 继承自 detail::exception
static std::string name (const std::string &ename, int id_)
 
static std::string diagnostics (std::nullptr_t)
 
template<typename BasicJsonType >
static std::string diagnostics (const BasicJsonType *leaf_element)
 

详细描述

exception indicating a parse error

参见
https://json.nlohmann.me/api/basic_json/parse_error/

构造及析构函数说明

◆ parse_error()

detail::parse_error::parse_error ( int id_,
std::size_t byte_,
const char * what_arg )
inlineprivate

成员函数说明

◆ create() [1/2]

static parse_error detail::parse_error::create ( int id_,
const position_t & pos,
const std::string & what_arg,
BasicJsonContext context )
inlinestatic

create a parse error exception

参数
[in]id_the id of the exception
[in]posthe position where the error occurred (or with chars_read_total=0 if the position cannot be determined)
[in]what_argthe explanatory string
返回
parse_error object
函数调用图:
这是这个函数的调用关系图:

◆ create() [2/2]

static parse_error detail::parse_error::create ( int id_,
std::size_t byte_,
const std::string & what_arg,
BasicJsonContext context )
inlinestatic
函数调用图:

◆ position_string()

static std::string detail::parse_error::position_string ( const position_t & pos)
inlinestaticprivate
函数调用图:
这是这个函数的调用关系图:

类成员变量说明

◆ byte

const std::size_t detail::parse_error::byte

byte index of the parse error

The byte index of the last read character in the input file.

注解
For an input with n bytes, 1 is the index of the first character and n+1 is the index of the terminating null byte or the end of file. This also holds true when reading a byte vector (CBOR or MessagePack).

该类的文档由以下文件生成: