aboutsummaryrefslogtreecommitdiff
path: root/src/base/io/Stream.cpp
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-09-07 03:34:56 +0800
committerYuqian Yang <crupest@crupest.life>2025-09-07 03:34:56 +0800
commit20123151d12a0b01453ab6a36c84e4d3e5ea9504 (patch)
tree27543f3e5bf6430298c94c38bad6ecc83dafdd47 /src/base/io/Stream.cpp
parent227118866190a7fe17b42e8c589c475781c69f33 (diff)
downloadcru-20123151d12a0b01453ab6a36c84e4d3e5ea9504.tar.gz
cru-20123151d12a0b01453ab6a36c84e4d3e5ea9504.tar.bz2
cru-20123151d12a0b01453ab6a36c84e4d3e5ea9504.zip
Remove some usage of my format.
Diffstat (limited to 'src/base/io/Stream.cpp')
-rw-r--r--src/base/io/Stream.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/base/io/Stream.cpp b/src/base/io/Stream.cpp
index 1944ea7e..9b7ef856 100644
--- a/src/base/io/Stream.cpp
+++ b/src/base/io/Stream.cpp
@@ -1,15 +1,18 @@
#include "cru/base/io/Stream.h"
#include "cru/base/Exception.h"
-#include "cru/base/Format.h"
+#include <format>
#include <utility>
namespace cru::io {
StreamOperationNotSupportedException::StreamOperationNotSupportedException(
- String operation)
- : operation_(std::move(operation)) {
- SetMessage(Format(u"Stream operation {} not supported.", operation_));
-}
+ StringView operation)
+ : StreamOperationNotSupportedException(operation.ToUtf8()) {}
+
+StreamOperationNotSupportedException::StreamOperationNotSupportedException(
+ std::string operation)
+ : Exception(std::format("Stream operation {} not supported.", operation)),
+ operation_(std::move(operation)) {}
void StreamOperationNotSupportedException::CheckSeek(bool seekable) {
if (!seekable) throw StreamOperationNotSupportedException(u"seek");