|
rapidyaml 0.15.2
parse and emit YAML, and do it fast
|
Shows how to create a scoped error handler. More...
Public Member Functions | |
| ScopedErrorHandlerExample () | |
| ~ScopedErrorHandlerExample () | |
| template<class Fn> | |
| bool | check_error_occurs (Fn &&fn) |
| checking that an error occurs while calling fn | |
| template<class Fn> | |
| bool | check_assertion_occurs (Fn &&fn) |
| checking that an assertion occurs while calling fn. | |
| void | check_enabled () const |
| test that this handler is currently set | |
| void | check_disabled () const |
| test that this handler is currently not set | |
| ryml::Callbacks | callbacks () |
| a helper to create the Callbacks object for the custom error handler | |
| void | on_error_basic (ryml::csubstr msg, ryml::ErrorDataBasic const &errdata) |
| this is where the callback implementation goes. | |
| void | on_error_parse (ryml::csubstr msg, ryml::ErrorDataParse const &errdata) |
| this is where the callback implementation goes. | |
| void | on_error_visit (ryml::csubstr msg, ryml::ErrorDataVisit const &errdata) |
| this is where the callback implementation goes. | |
Static Public Member Functions | |
| static void | s_error_basic (ryml::csubstr msg, ryml::ErrorDataBasic const &errdata, void *this_) |
| trampoline function to call the object's method | |
| static void | s_error_parse (ryml::csubstr msg, ryml::ErrorDataParse const &errdata, void *this_) |
| trampoline function to call the object's method | |
| static void | s_error_visit (ryml::csubstr msg, ryml::ErrorDataVisit const &errdata, void *this_) |
| trampoline function to call the object's method | |
Public Attributes | |
| ryml::Callbacks | original_callbacks |
| std::string | saved_msg_short |
| std::string | saved_msg_full |
| std::string | saved_msg_full_with_context |
| ryml::Location | saved_basic_loc |
| ryml::Location | saved_parse_loc |
| ryml::Tree const * | saved_visit_tree |
| ryml::id_type | saved_visit_id |
Shows how to create a scoped error handler.
Definition at line 366 of file quickstart.cpp.
|
inline |
Definition at line 368 of file quickstart.cpp.
|
inline |
Definition at line 373 of file quickstart.cpp.
|
inherited |
Definition at line 332 of file quickstart.cpp.
Referenced by ErrorHandlerExample(), ScopedErrorHandlerExample::~ScopedErrorHandlerExample(), callbacks(), check_disabled(), check_enabled(), sample_error_handler(), sample_error_parse(), and sample_error_visit().
|
inherited |
Definition at line 354 of file quickstart.cpp.
Referenced by check_error_occurs(), on_error_basic(), on_error_parse(), on_error_visit(), sample_error_parse(), sample_error_visit(), and sample_error_visit_location().
|
inherited |
Definition at line 355 of file quickstart.cpp.
Referenced by check_error_occurs(), on_error_basic(), on_error_parse(), on_error_visit(), sample_error_parse(), sample_error_visit(), and sample_error_visit_location().
|
inherited |
Definition at line 356 of file quickstart.cpp.
Referenced by check_error_occurs(), on_error_basic(), on_error_parse(), and on_error_visit().
|
inherited |
Definition at line 357 of file quickstart.cpp.
Referenced by check_error_occurs(), on_error_basic(), on_error_parse(), on_error_visit(), sample_error_parse(), sample_error_visit(), and sample_error_visit_location().
|
inherited |
Definition at line 358 of file quickstart.cpp.
Referenced by check_error_occurs(), on_error_parse(), and sample_error_parse().
|
inherited |
Definition at line 359 of file quickstart.cpp.
Referenced by check_error_occurs(), on_error_visit(), sample_error_visit(), and sample_error_visit_location().
|
inherited |
Definition at line 360 of file quickstart.cpp.
Referenced by check_error_occurs(), on_error_visit(), sample_error_visit(), and sample_error_visit_location().