exception indicating a parse error
更多...
#include <exceptions.hpp>
|
| 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) |
|
| const std::size_t | byte |
| | byte index of the parse error
|
| const int | id |
| | the id of the exception
|
|
| const char * | what () const noexcept override |
| | returns the explanatory string
|
|
| exception (int id_, const char *what_arg) |
|
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) |
◆ create()
template<typename BasicJsonContext, enable_if_t<
is_basic_json_context< BasicJsonContext >::value, int > = 0>
| 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] | pos | the position where the error occurred (or with chars_read_total=0 if the position cannot be determined) |
| [in] | what_arg | the explanatory string |
- 返回
- parse_error object
◆ 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).
该类的文档由以下文件生成: