diff options
author | Yuqian Yang <crupest@crupest.life> | 2025-08-18 17:49:31 +0800 |
---|---|---|
committer | Yuqian Yang <crupest@crupest.life> | 2025-08-18 17:49:31 +0800 |
commit | 73044013ab7d882150f32c959635eecbb5e8e17d (patch) | |
tree | 609ec8bb6223b1b3c95d53820e78a4b63438f227 | |
parent | 18c64a5e92f7d8583cb091881deae7611a2bce98 (diff) | |
download | cru-73044013ab7d882150f32c959635eecbb5e8e17d.tar.gz cru-73044013ab7d882150f32c959635eecbb5e8e17d.tar.bz2 cru-73044013ab7d882150f32c959635eecbb5e8e17d.zip |
Move platform exception.
-rw-r--r-- | include/cru/base/Exception.h | 7 | ||||
-rw-r--r-- | include/cru/base/platform/Exception.h | 12 | ||||
-rw-r--r-- | include/cru/platform/Exception.h | 1 | ||||
-rw-r--r-- | src/base/CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/base/platform/Exception.cpp | 1 |
5 files changed, 7 insertions, 15 deletions
diff --git a/include/cru/base/Exception.h b/include/cru/base/Exception.h index 609fd2c9..b299acc4 100644 --- a/include/cru/base/Exception.h +++ b/include/cru/base/Exception.h @@ -34,6 +34,13 @@ class CRU_BASE_API Exception : public std::exception { std::unique_ptr<std::exception> inner_; }; +class CRU_BASE_API PlatformException : public Exception { + public: + using Exception::Exception; // inherit constructors + + CRU_DEFAULT_DESTRUCTOR(PlatformException) +}; + class CRU_BASE_API TextEncodeException : public Exception { public: using Exception::Exception; diff --git a/include/cru/base/platform/Exception.h b/include/cru/base/platform/Exception.h deleted file mode 100644 index 74dd6ad4..00000000 --- a/include/cru/base/platform/Exception.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once -#include "../Base.h" -#include "../Exception.h" - -namespace cru::platform { -class CRU_BASE_API PlatformException : public Exception { - public: - using Exception::Exception; // inherit constructors - - CRU_DEFAULT_DESTRUCTOR(PlatformException) -}; -} // namespace cru::platform diff --git a/include/cru/platform/Exception.h b/include/cru/platform/Exception.h index 2771d4d7..4f9dc9ce 100644 --- a/include/cru/platform/Exception.h +++ b/include/cru/platform/Exception.h @@ -2,7 +2,6 @@ #include "Base.h" #include "cru/base/Base.h" #include "cru/base/Exception.h" -#include "cru/base/platform/Exception.h" #include <optional> diff --git a/src/base/CMakeLists.txt b/src/base/CMakeLists.txt index 00f35772..6f33441d 100644 --- a/src/base/CMakeLists.txt +++ b/src/base/CMakeLists.txt @@ -17,7 +17,6 @@ add_library(CruBase io/MemoryStream.cpp log/Logger.cpp log/StdioLogTarget.cpp - platform/Exception.cpp ) target_compile_definitions(CruBase PRIVATE CRU_BASE_EXPORT_API) target_include_directories(CruBase PUBLIC ${CRU_INCLUDE_DIR}) diff --git a/src/base/platform/Exception.cpp b/src/base/platform/Exception.cpp deleted file mode 100644 index b5e8c5b9..00000000 --- a/src/base/platform/Exception.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "cru/base/platform/Exception.h" |