From f9f1b1207e6629f8bcebb43859127bc46688a1a8 Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Mon, 23 Jan 2023 10:19:00 +0100 Subject: [PATCH] - improved error logging --- snapper/Comparison.cc | 2 +- snapper/Snapshot.cc | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/snapper/Comparison.cc b/snapper/Comparison.cc index ef3a273a..986a389e 100644 --- a/snapper/Comparison.cc +++ b/snapper/Comparison.cc @@ -337,7 +337,7 @@ namespace snapper int fd = info_dir.mktemp(tmp_name); if (fd < -1) - SN_THROW(IOErrorException(sformat("mkstemp failed errno:%d (%s)", errno, + SN_THROW(IOErrorException(sformat("SDir::mktemp failed errno:%d (%s)", errno, stringerror(errno).c_str()))); try diff --git a/snapper/Snapshot.cc b/snapper/Snapshot.cc index 1974bbac..6505c46a 100644 --- a/snapper/Snapshot.cc +++ b/snapper/Snapshot.cc @@ -505,7 +505,8 @@ namespace snapper int fd = info_dir.mktemp(tmp_name); if (fd < 0) - SN_THROW(IOErrorException("mktemp failed")); + SN_THROW(IOErrorException(sformat("SDir::mktemp failed, errno:%d (%s)", errno, + stringerror(errno).c_str()))); try { -- 2.47.3