aboutsummaryrefslogtreecommitdiff
path: root/zencore/include
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-15 14:56:47 +0200
committerStefan Boberg <[email protected]>2021-09-15 14:56:47 +0200
commit7fa42126867b0c2e87eac035179250bf51a3f5c4 (patch)
tree73d5d20796aaafb66a691d0d0bc5db97aa267cca /zencore/include
parentUnsigned / signed comparison warning fixes (diff)
downloadzen-7fa42126867b0c2e87eac035179250bf51a3f5c4.tar.xz
zen-7fa42126867b0c2e87eac035179250bf51a3f5c4.zip
Handle absence of std::source_location somewhat more gracefully (relies on client code also checking)
Diffstat (limited to 'zencore/include')
-rw-r--r--zencore/include/zencore/except.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/zencore/include/zencore/except.h b/zencore/include/zencore/except.h
index 486f3e380..36cca895f 100644
--- a/zencore/include/zencore/except.h
+++ b/zencore/include/zencore/except.h
@@ -54,7 +54,11 @@ ZENCORE_API void ThrowSystemException(HRESULT hRes, std::string_view Message);
#endif // ZEN_PLATFORM_WINDOWS
ZENCORE_API void ThrowLastError(std::string_view Message);
+
+#if __cpp_lib_source_location
ZENCORE_API void ThrowLastError(std::string_view Message, const std::source_location& Location);
+#endif
+
ZENCORE_API std::string GetLastErrorAsString();
ZENCORE_API std::string GetWindowsErrorAsString(uint32_t Win32ErrorCode);