diff options
Diffstat (limited to 'backend/lib/Support')
| -rw-r--r-- | backend/lib/Support/Error.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/backend/lib/Support/Error.cpp b/backend/lib/Support/Error.cpp index 2bda044..d4793b5 100644 --- a/backend/lib/Support/Error.cpp +++ b/backend/lib/Support/Error.cpp @@ -61,4 +61,9 @@ std::string_view getErrorCodeName(ErrorCode Code) noexcept { Error::Error(ErrorCode Code, std::string Message) : Code(Code), Message(std::move(Message)) {} +Error withErrorContext(const Error &Failure, std::string Context) { + Context.append(Failure.message()); + return Error(Failure.code(), std::move(Context)); +} + } // namespace rcc |
