Error handling: few possible modifications to ponder
-
Add a reference to
std::error_code
(see https://akrzemi1.wordpress.com/2017/07/12/your-own-error-code/) -
I changed my mind about specific homemade exceptions in the context of tests (it is helpful sometimes to check the exception you get in a test where it was expected is really the exception you sought and not a side effect from elsewhere...)
-
Add nodiscard here (it was previously mentioned in "Functions" notebook but ill positioned as it was for a void function...)