I'm using Boost.JSON to load some static data into a tree of structures.
The parser throws exceptions on parse errors, and I print the
std::exception::what() string. (I throw them up in a messagebox in my GUI.)
I see things like "not a number" when parsing a string where a number was
expected. But I don't see any information on where in the source string the
parse error happened so I have to set a breakpoint in my tag_invoke
functions to figure out where the syntax errors lie. Is there some way to
get the library to report the offset in the source string to where the
parse error happens as part of the exception?
Here's my top-level invocation:
#include <fstream>
#include <stdexcept>
#define BOOST_DLL_USE_STD_FS 1 // tell program_location to return a
std::filesystem::path
#include (jv.as_object().at("axis")); Library source and background: https://github.com/boostorg/json