aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2025-06-05 14:54:29 +0200
committerGitHub Enterprise <[email protected]>2025-06-05 14:54:29 +0200
commit92d5b9ffcf6e19b7dd843655bfe06728d8770372 (patch)
treea5e583777a6183198c7681be10eaafe3e9c50f97 /src
parentpause, resume and abort running builds cmd (#421) (diff)
downloadzen-92d5b9ffcf6e19b7dd843655bfe06728d8770372.tar.xz
zen-92d5b9ffcf6e19b7dd843655bfe06728d8770372.zip
silence oom ood errors for sentry (#423)
- Improvement: Don't report OOD or OOM errors to Sentry when running `zen builds` commands
Diffstat (limited to 'src')
-rw-r--r--src/zen/cmds/builds_cmd.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/zen/cmds/builds_cmd.cpp b/src/zen/cmds/builds_cmd.cpp
index 49b032ab1..1f7dbd91b 100644
--- a/src/zen/cmds/builds_cmd.cpp
+++ b/src/zen/cmds/builds_cmd.cpp
@@ -11535,6 +11535,24 @@ BuildsCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
return 0;
}
}
+ catch (const std::system_error& SysErr)
+ {
+ if (IsOOD(SysErr))
+ {
+ ZEN_CONSOLE("Operation failed due to out of disk space: {}", SysErr.what());
+ return 3;
+ }
+ else if (IsOOM(SysErr))
+ {
+ ZEN_CONSOLE("Operation failed due to out of memory: {}", SysErr.what());
+ return 3;
+ }
+ else
+ {
+ ZEN_ERROR("{}", SysErr.what());
+ return 3;
+ }
+ }
catch (const std::exception& Ex)
{
ZEN_ERROR("{}", Ex.what());