aboutsummaryrefslogtreecommitdiff
path: root/src/base/io/Stream.cpp
diff options
context:
space:
mode:
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");