aboutsummaryrefslogtreecommitdiff
path: root/zencore
diff options
context:
space:
mode:
Diffstat (limited to 'zencore')
-rw-r--r--zencore/except.cpp4
-rw-r--r--zencore/include/zencore/except.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/zencore/except.cpp b/zencore/except.cpp
index 0d31885e1..d57b539cd 100644
--- a/zencore/except.cpp
+++ b/zencore/except.cpp
@@ -5,6 +5,8 @@
namespace zen {
+#if ZEN_PLATFORM_WINDOWS
+
void
ThrowSystemException([[maybe_unused]] HRESULT hRes, [[maybe_unused]] std::string_view Message)
{
@@ -18,6 +20,8 @@ ThrowSystemException([[maybe_unused]] HRESULT hRes, [[maybe_unused]] std::string
}
}
+#endif // ZEN_PLATFORM_WINDOWS
+
void
ThrowLastError(std::string_view Message)
{
diff --git a/zencore/include/zencore/except.h b/zencore/include/zencore/except.h
index aa4c1462d..486f3e380 100644
--- a/zencore/include/zencore/except.h
+++ b/zencore/include/zencore/except.h
@@ -14,6 +14,7 @@
namespace zen {
+#if ZEN_PLATFORM_WINDOWS
class WindowsException : public std::exception
{
public:
@@ -50,6 +51,7 @@ private:
};
ZENCORE_API void ThrowSystemException(HRESULT hRes, std::string_view Message);
+#endif // ZEN_PLATFORM_WINDOWS
ZENCORE_API void ThrowLastError(std::string_view Message);
ZENCORE_API void ThrowLastError(std::string_view Message, const std::source_location& Location);