19#include "flow/error/error.hpp"
28 boost::system::system_error(err_code_or_success,
30 ? std::string(context)
33 m_context_if_no_code(code()
35 : std::string(context))
50 ? boost::system::system_error::what()
An std::runtime_error (which is an std::exception) that stores an Error_code.
Runtime_error(const Error_code &err_code_or_success, util::String_view context="")
Constructs Runtime_error.
const std::string m_context_if_no_code
This is a copy of context from ctor if !err_code_or_success; or unused otherwise.
const char * what() const noexcept override
Returns a message describing the exception.
Flow module that facilitates working with error codes and exceptions; essentially comprised of niceti...
Basic_string_view< char > String_view
Commonly used char-based Basic_string_view. See its doc header.
boost::system::error_code Error_code
Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...