diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-11-03 20:12:12 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-11-03 20:12:12 +0800 |
| commit | 76746163e04555eb129fc2590ee8b0312fad872c (patch) | |
| tree | 673c606c245456b13510caadaa37b67b19b6973a /src/platform/Exception.cpp | |
| parent | 06f16479ae1b727252404b763b60c924e3fe7903 (diff) | |
| download | cru-76746163e04555eb129fc2590ee8b0312fad872c.tar.gz cru-76746163e04555eb129fc2590ee8b0312fad872c.tar.bz2 cru-76746163e04555eb129fc2590ee8b0312fad872c.zip | |
Merge platform/Exception.h Check.h to Base.h.
Diffstat (limited to 'src/platform/Exception.cpp')
| -rw-r--r-- | src/platform/Exception.cpp | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/platform/Exception.cpp b/src/platform/Exception.cpp deleted file mode 100644 index 6a718f63..00000000 --- a/src/platform/Exception.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "cru/platform/Exception.h" -#include "cru/base/Exception.h" - -#include <format> -#include <optional> -#include <string_view> - -namespace cru::platform { -PlatformNotMatchException::PlatformNotMatchException( - std::string resource_platform, std::string target_platform, - std::optional<std::string_view> additional_message) - : PlatformException(std::format( - "Resource platform '{}' does not match target platform '{}'.", - resource_platform_, target_platform_)), - resource_platform_(std::move(resource_platform)), - target_platform_(std::move(target_platform)) { - AppendMessage(additional_message); -} - -PlatformNotMatchException::~PlatformNotMatchException() {} - -PlatformUnsupportedException::PlatformUnsupportedException( - std::string platform, std::string operation, - std::optional<std::string_view> additional_message) - : PlatformException( - std::format("Operation '{}' is not supported on platform '{}'.", - operation, platform)), - platform_(std::move(platform)), - operation_(std::move(operation)) { - AppendMessage(additional_message); -} - -PlatformUnsupportedException::~PlatformUnsupportedException() {} -} // namespace cru::platform |
