We use Boost.Exception in our project but we lack a way to exercise better control over the diagnostic formatting. This has already been discussed before in a related issue #55.
In our client/server project, we need to 'serialize' the exceptions (e.g. to JSON) while retaining as much information as possible for the client to display. The client being responsible to format and present the error message.
I managed to hack the library's diagnostic_information to return a boost::json::value (instead of a std::string) but I would prefer a solution that is part of the library.
I know this library is kind of superseded by LEAF, but we are not ready to switch (mostly because of the awkward try catch syntax).
What do you think about introducing a customization point (visitor pattern?) to introspect an exception and its error_infos to get diagnostic information in a custom data structure?