diff options
| author | Stefan Boberg <[email protected]> | 2021-08-28 21:08:17 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-08-28 21:08:17 +0200 |
| commit | 564426023ae4d83b83770e827ea7815b30061100 (patch) | |
| tree | 145d9226d83b4b53f07583e559609410b52cd39a /zencore/except.cpp | |
| parent | Basic implementation of function evaluation (diff) | |
| parent | Added missing lock to side channel InsertChunk() implementation (diff) | |
| download | zen-564426023ae4d83b83770e827ea7815b30061100.tar.xz zen-564426023ae4d83b83770e827ea7815b30061100.zip | |
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'zencore/except.cpp')
| -rw-r--r-- | zencore/except.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/zencore/except.cpp b/zencore/except.cpp index 68b9e9a9b..00cb826f6 100644 --- a/zencore/except.cpp +++ b/zencore/except.cpp @@ -25,6 +25,12 @@ ThrowLastError(std::string_view Message) throw std::system_error(std::error_code(::GetLastError(), std::system_category()), std::string(Message)); } +std::string +GetLastErrorAsString() +{ + throw std::error_code(::GetLastError(), std::system_category()).message(); +} + void ThrowLastError(std::string_view Message, const std::source_location& Location) { |