MCPcopy Create free account
hub / github.com/bitfieldaudio/OTTO / create

Method create

external/include/json.hpp:279–285  ·  view source on GitHub ↗

! @brief create a parse error exception @param[in] id_ the id of the exception @param[in] byte_ the byte index where the error occurred (or 0 if the position cannot be determined) @param[in] what_arg the explanatory string @return parse_error object */

Source from the content-addressed store, hash-verified

277 @return parse_error object
278 */
279 static parse_error create(int id_, std::size_t byte_, const std::string& what_arg)
280 {
281 std::string w = exception::name("parse_error", id_) + "parse error" +
282 (byte_ != 0 ? (" at " + std::to_string(byte_)) : "") +
283 ": " + what_arg;
284 return parse_error(id_, byte_, w.c_str());
285 }
286
287 /*!
288 @brief byte index of the parse error

Callers

nothing calls this directly

Calls 3

parse_errorClass · 0.85
to_stringFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected