aboutsummaryrefslogtreecommitdiff
path: root/backend/include
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-13 13:18:05 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-13 13:18:05 +0800
commit8558f80b4077536d6aa46b97328d6df1210e261f (patch)
tree373a2242db00ddeb9a1af83dbd853e97e0bd12d3 /backend/include
parent65321c12beb31c5743e0cf3f28e7aec178b730a2 (diff)
downloadrcc-project-8558f80b4077536d6aa46b97328d6df1210e261f.tar.gz
rcc-project-8558f80b4077536d6aa46b97328d6df1210e261f.tar.xz
[Support] Centralize error context handling
Diffstat (limited to 'backend/include')
-rw-r--r--backend/include/rcc/Support/Error.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/include/rcc/Support/Error.h b/backend/include/rcc/Support/Error.h
index 0429cc0..b631635 100644
--- a/backend/include/rcc/Support/Error.h
+++ b/backend/include/rcc/Support/Error.h
@@ -56,6 +56,8 @@ private:
std::string Message;
};
+[[nodiscard]] Error withErrorContext(const Error &Failure, std::string Context);
+
template <typename ValueT> using Expected = std::expected<ValueT, Error>;
[[nodiscard]] inline std::unexpected<Error> makeUnexpected(ErrorCode Code, std::string Message) {