|
Common System 0.2.0
Common interfaces and patterns for system integration
|
C++20 module partition for Result<T> utility functions. More...
#include <stdexcept>#include <string>#include <system_error>#include <utility>#include <variant>import kcenon.common:error;
Go to the source code of this file.
Classes | |
| class | kcenon::common::exception_mapper |
| Maps standard exception types to appropriate error codes. More... | |
Namespaces | |
| namespace | kcenon |
| namespace | kcenon::common |
| Core interfaces. | |
| namespace | kcenon::common::error_codes |
Functions | |
| template<typename T > | |
| Result< T > | kcenon::common::ok (T value) |
| Create a successful result. | |
| template<typename T > | |
| Result< T > | kcenon::common::make_error (int code, const std::string &message, const std::string &module="") |
| Create an error result with code and message. | |
| template<typename T > | |
| Result< T > | kcenon::common::make_error (int code, const std::string &message, const std::string &module, const std::string &details) |
| Create an error result with details. | |
| template<typename T > | |
| Result< T > | kcenon::common::make_error (const error_info &err) |
| Create an error result from existing error_info. | |
| template<typename T , typename F > | |
| Result< T > | kcenon::common::try_catch (F &&func, const std::string &module="") |
| Convert exception to Result with automatic error code mapping. | |
| template<typename F > | |
| VoidResult | kcenon::common::try_catch_void (F &&func, const std::string &module="") |
| Convert exception to VoidResult with automatic error code mapping. | |
C++20 module partition for Result<T> utility functions.
This module partition exports Result pattern utilities:
Part of the kcenon.common module.
Definition in file utilities.cppm.