hoshi-lang dev
Yet another programming language
Loading...
Searching...
No Matches
exception Class Reference

general exception of the basic_json class More...

#include <json.hpp>

Inheritance diagram for exception:
Collaboration diagram for exception:

Public Member Functions

const char * what () const noexcept override
 returns the explanatory string
 

Public Attributes

const int id
 the id of the exception
 

Protected Member Functions

 exception (int id_, const char *what_arg)
 

Static Protected Member Functions

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)
 

Static Private Member Functions

template<typename BasicJsonType >
static std::string get_byte_positions (const BasicJsonType *leaf_element)
 

Private Attributes

std::runtime_error m
 an exception object as storage for error messages
 

Detailed Description

general exception of the basic_json class

See also
https://json.nlohmann.me/api/basic_json/exception/

Definition at line 4510 of file json.hpp.

Constructor & Destructor Documentation

◆ exception()

exception ( int  id_,
const char *  what_arg 
)
inlineprotected

Definition at line 4524 of file json.hpp.

Member Function Documentation

◆ diagnostics() [1/2]

template<typename BasicJsonType >
static std::string diagnostics ( const BasicJsonType *  leaf_element)
inlinestaticprotected

◆ diagnostics() [2/2]

static std::string diagnostics ( std::nullptr_t  )
inlinestaticprotected

Definition at line 4531 of file json.hpp.

Referenced by parse_error::create(), invalid_iterator::create(), type_error::create(), out_of_range::create(), other_error::create(), and parse_error::create().

Here is the caller graph for this function:

◆ get_byte_positions()

template<typename BasicJsonType >
static std::string get_byte_positions ( const BasicJsonType *  leaf_element)
inlinestaticprivate

Definition at line 4616 of file json.hpp.

Referenced by exception::diagnostics().

Here is the caller graph for this function:

◆ name()

static std::string name ( const std::string &  ename,
int  id_ 
)
inlinestaticprotected

Definition at line 4526 of file json.hpp.

References detail::concat().

Referenced by parse_error::create(), invalid_iterator::create(), type_error::create(), out_of_range::create(), other_error::create(), and parse_error::create().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ what()

const char * what ( ) const
inlineoverridenoexcept

returns the explanatory string

Definition at line 4514 of file json.hpp.

References exception::m.

Member Data Documentation

◆ id

const int id

the id of the exception

Definition at line 4520 of file json.hpp.

◆ m

std::runtime_error m
private

an exception object as storage for error messages

Definition at line 4603 of file json.hpp.

Referenced by exception::what().


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