aboutsummaryrefslogtreecommitdiffhomepage
path: root/tdutils
diff options
context:
space:
mode:
authorlevlam <levlam@telegram.org>2024-12-04 17:06:35 +0300
committerlevlam <levlam@telegram.org>2024-12-04 17:06:35 +0300
commitb00f9dd3c26cf9543cd54d28fa8a090c0b5673ae (patch)
tree9473cb9aaaab352ed402cbbb464d8a4e8627ddc1 /tdutils
parenteb98bbe611e1132f98914e4cd4e2c727079cc84d (diff)
Improve error message.
Diffstat (limited to 'tdutils')
-rw-r--r--tdutils/td/utils/port/Stat.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tdutils/td/utils/port/Stat.cpp b/tdutils/td/utils/port/Stat.cpp
index acb0c5dd4..28972a5c5 100644
--- a/tdutils/td/utils/port/Stat.cpp
+++ b/tdutils/td/utils/port/Stat.cpp
@@ -316,7 +316,7 @@ Status cpu_stat_self(CpuStat &stat) {
char mem[TMEM_SIZE];
TRY_RESULT(size, fd.read(MutableSlice(mem, TMEM_SIZE - 1)));
if (size >= TMEM_SIZE - 1) {
- return Status::Error("Failed for read /proc/self/stat");
+ return Status::Error("The file /proc/self/stat is too big");
}
mem[size] = 0;
@@ -354,7 +354,7 @@ Status cpu_stat_total(CpuStat &stat) {
char mem[TMEM_SIZE];
TRY_RESULT(size, fd.read(MutableSlice(mem, TMEM_SIZE - 1)));
if (size >= TMEM_SIZE - 1) {
- return Status::Error("Failed for read /proc/stat");
+ return Status::Error("The file /proc/stat is too big");
}
mem[size] = 0;