Print error strings when transactions fail in ldb tools
[kai/samba.git] / source4 / lib / ldb / tools / ldbmodify.c
index 8b6309e016af2ee5b85869e7c7a0f5e519d2f6b3..0288e4e6885bb197155d37bbbbc32bef16df4f10 100644 (file)
@@ -92,7 +92,7 @@ int main(int argc, const char **argv)
        ldb = ldb_init(NULL, NULL);
 
        if (ldb_transaction_start(ldb) != 0) {
-               printf("Failed to start transaction\n");
+               printf("Failed to start transaction: %s\n", ldb_errstring(ldb));
                exit(1);
        }
 
@@ -114,7 +114,7 @@ int main(int argc, const char **argv)
        }
 
        if (count != 0 && ldb_transaction_commit(ldb) != 0) {
-               printf("Failed to commit transaction\n");
+               printf("Failed to commit transaction: %s\n", ldb_errstring(ldb));
                exit(1);
        }