]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- improved error message 888/head
authorArvin Schnell <aschnell@suse.de>
Tue, 19 Mar 2024 13:59:21 +0000 (14:59 +0100)
committerArvin Schnell <aschnell@suse.de>
Tue, 19 Mar 2024 13:59:21 +0000 (14:59 +0100)
package/snapper.changes
snapper/XmlFile.cc

index f09f225d2ba8945723ebb4d0d3188baec1cd241b..6fcfbf0dfe5433baecbda3137b0066cdaa9813b0 100644 (file)
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Tue Mar 19 14:58:12 CET 2024 - aschnell@suse.com
+
+- improved error message (gh#openSUSE/snapper#864)
+
 -------------------------------------------------------------------
 Sat  9 Mar 09:44:17 GMT 2024 - infinity0@pwned.gg
 
index 75eda3f91de39ed6620f70326c301b83fec99b9e..6361baaf57f8811b1e48d9c0c7a5edc58022183c 100644 (file)
@@ -75,10 +75,13 @@ namespace snapper
            SN_THROW(IOErrorException("fdopen"));
        }
 
+       errno = 0;
+
        if (xmlDocFormatDump(f, doc, 1) == -1)
        {
            fclose(f);
-           SN_THROW(IOErrorException("xmlDocFormatDump failed"));
+           SN_THROW(IOErrorException(sformat("xmlDocFormatDump failed, errno:%d (%s)", errno,
+                                             stringerror(errno).c_str())));
        }
 
        fflush(f);