From ae1358e9782f86d5fd4241322402908989834772 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Mon, 7 Apr 2025 07:30:18 +0200 Subject: [PATCH] fix(dwarfs_main): don't throw in dtor --- tools/src/dwarfs_main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/src/dwarfs_main.cpp b/tools/src/dwarfs_main.cpp index c9acf68c..33a3bbb0 100644 --- a/tools/src/dwarfs_main.cpp +++ b/tools/src/dwarfs_main.cpp @@ -229,7 +229,11 @@ class dwarfs_analysis { ~dwarfs_analysis() { if (!path_.empty()) { - write_analysis(); + try { + write_analysis(); + } catch (std::exception const& e) { + std::cerr << "Failed to write analysis: " << e.what() << '\n'; + } } }