aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/zen/cmds/builds_cmd.cpp18
2 files changed, 19 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 23f8c148e..9f90dfc19 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
- Improvement: Multithreaded scavenge pass for zen builds download
- Improvement: Optimized check for modified files when verifying state of scavenged paths
- Improvement: Process report now indicates if it is pausing or aborting
+- Improvement: Don't report OOD or OOM errors to Sentry when running `zen builds` commands
- Bugfix: Zen CLI now initializes Sentry after command line options parsing, so that the options can be propetly taken into account during init
- Bugfix: Revert: `zen builds upload` now use the system temp directory for temporary files leaving the source folder untouched
- Bugfix: Use selected subcommand when displaying help for failed command line options in zen builds
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());