From: Arvin Schnell Date: Mon, 23 Jan 2023 09:19:00 +0000 (+0100) Subject: - improved error logging X-Git-Tag: v0.10.5~64^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F773%2Fhead;p=thirdparty%2Fsnapper.git - improved error logging --- 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 {