aboutsummaryrefslogtreecommitdiff
path: root/src/base/platform/unix/UnixFileStream.cpp
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-10-17 08:37:30 +0800
committerYuqian Yang <crupest@crupest.life>2025-10-17 08:37:30 +0800
commit3c8d5c8f732239a8b50418be27464e30b9dddeae (patch)
tree8ffb46c18e48c8463c1fb16fcacf216f296b8a1f /src/base/platform/unix/UnixFileStream.cpp
parent37943858b3b260589b5dc222bb5184d2846fb6dc (diff)
downloadcru-3c8d5c8f732239a8b50418be27464e30b9dddeae.tar.gz
cru-3c8d5c8f732239a8b50418be27464e30b9dddeae.tar.bz2
cru-3c8d5c8f732239a8b50418be27464e30b9dddeae.zip
Exception remove string.
Diffstat (limited to 'src/base/platform/unix/UnixFileStream.cpp')
-rw-r--r--src/base/platform/unix/UnixFileStream.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/base/platform/unix/UnixFileStream.cpp b/src/base/platform/unix/UnixFileStream.cpp
index 0772c279..43ff2244 100644
--- a/src/base/platform/unix/UnixFileStream.cpp
+++ b/src/base/platform/unix/UnixFileStream.cpp
@@ -33,7 +33,7 @@ int MapSeekOrigin(Stream::SeekOrigin origin) {
case Stream::SeekOrigin::End:
return SEEK_END;
default:
- throw Exception(u"Invalid seek origin.");
+ throw Exception("Invalid seek origin.");
}
}
} // namespace
@@ -58,7 +58,7 @@ UnixFileStream::~UnixFileStream() { DoClose(); }
Index UnixFileStream::DoSeek(Index offset, SeekOrigin origin) {
off_t result = ::lseek(file_descriptor_, offset, MapSeekOrigin(origin));
if (result == -1) {
- throw ErrnoException(u"Failed to seek file.");
+ throw ErrnoException("Failed to seek file.");
}
return result;
}
@@ -66,7 +66,7 @@ Index UnixFileStream::DoSeek(Index offset, SeekOrigin origin) {
Index UnixFileStream::DoRead(std::byte *buffer, Index offset, Index size) {
auto result = ::read(file_descriptor_, buffer + offset, size);
if (result == -1) {
- throw ErrnoException(u"Failed to read file.");
+ throw ErrnoException("Failed to read file.");
}
return result;
}
@@ -75,7 +75,7 @@ Index UnixFileStream::DoWrite(const std::byte *buffer, Index offset,
Index size) {
auto result = ::write(file_descriptor_, buffer + offset, size);
if (result == -1) {
- throw ErrnoException(u"Failed to write file.");
+ throw ErrnoException("Failed to write file.");
}
return result;
}