Return result with more error information when opening a shared library fails.

This commit is contained in:
2024-07-29 21:48:04 +02:00
parent a9a85aecdf
commit f6f77f6dc1
4 changed files with 29 additions and 8 deletions

View File

@@ -61,6 +61,14 @@ public:
struct ResultError
{
std::string message;
ResultError() : message("Unknown error") {}
ResultError(const ResultError&) = default;
ResultError(ResultError&&) noexcept = default;
ResultError(std::string msg) noexcept : message(std::move(msg)) {}
ResultError& operator=(const ResultError&) = default;
ResultError& operator=(ResultError&&) noexcept = default;
};
template<typename TSuccess>