koinos / koinos-exception-cpp

An exception library used by Koinos C++ applications.
MIT License
0 stars 0 forks source link

Store error data on koinos::exception #16

Closed mvandeberg closed 2 years ago

mvandeberg commented 2 years ago

Resolves koinos/koinos-chain#700

Brief description

Store error_data in the exception instead of only a string message.

Checklist

Demonstration

# ./tests/koinos_exception_tests -l message
Running 1 test case...
Throw an exception with an initial capture and a caught capture.
Throw an exception with no initial capture and a caught capture.
Throw an exception with an initial capture and a caught extra capture.
Throw an exception with an initial object capture and a missing capture.
Throw an exception with an object capture.
Throw an exception with an initial implicit const object capture.
Throw an exception with an object with a stream operator.
Throw an exception with a message that has been moved.
Throw an exception with an escaped message.
Throw an exception with an embedded dollar sign.
Throw an exception with a std::size_t replacement.
Throw an exception and test for the existence of a stacktrace.
Throw an exception with a malformed token.
Throw an exception without using the provided macros.
Throw an exception adding JSON via add_json API.
Check throwing an exception with error_data
Throw an exception with an initial capture and a caught capture.
Throw an exception with no initial capture and a caught capture.
Throw an exception with an initial capture and a caught extra capture.
Throw an exception with an initial object capture and a missing capture.
Throw an exception with an object capture.
Throw an exception with an initial implicit const object capture.
Throw an exception with an object with a stream operator.
Throw an exception with a message that has been moved.
Throw an exception with an escaped message.
Throw an exception with an embedded dollar sign.
Throw an exception with a std::size_t replacement.
Throw an exception and test for the existence of a stacktrace.
Throw an exception with a malformed token.
Throw an exception without using the provided macros.
Throw an exception adding JSON via add_json API.
Check throwing an exception with error_data
Throw an exception with an initial capture and a caught capture.
Throw an exception with no initial capture and a caught capture.
Throw an exception with an initial capture and a caught extra capture.
Throw an exception with an initial object capture and a missing capture.
Throw an exception with an object capture.
Throw an exception with an initial implicit const object capture.
Throw an exception with an object with a stream operator.
Throw an exception with a message that has been moved.
Throw an exception with an escaped message.
Throw an exception with an embedded dollar sign.
Throw an exception with a std::size_t replacement.
Throw an exception and test for the existence of a stacktrace.
Throw an exception with a malformed token.
Throw an exception without using the provided macros.
Throw an exception adding JSON via add_json API.
Check throwing an exception with error_data
Throw an exception with an initial capture and a caught capture.
Throw an exception with no initial capture and a caught capture.
Throw an exception with an initial capture and a caught extra capture.
Throw an exception with an initial object capture and a missing capture.
Throw an exception with an object capture.
Throw an exception with an initial implicit const object capture.
Throw an exception with an object with a stream operator.
Throw an exception with a message that has been moved.
Throw an exception with an escaped message.
Throw an exception with an embedded dollar sign.
Throw an exception with a std::size_t replacement.
Throw an exception and test for the existence of a stacktrace.
Throw an exception with a malformed token.
Throw an exception without using the provided macros.
Throw an exception adding JSON via add_json API.
Check throwing an exception with error_data

*** No errors detected