summaryrefslogtreecommitdiffstats
path: root/source/scripting
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-12-28 03:57:26 +0000
committerAndrew Bartlett <abartlet@samba.org>2005-12-28 03:57:26 +0000
commit6d38dba3aaa17e77b33dce4b5ba43a4da358a0dd (patch)
tree25fc459e19f8ea6395e426d9d5e67bafa10f68ac /source/scripting
parenteb17a6a21533c9de8e94c98eddce8e46ce4e3f3f (diff)
downloadsamba-6d38dba3aaa17e77b33dce4b5ba43a4da358a0dd.tar.gz
samba-6d38dba3aaa17e77b33dce4b5ba43a4da358a0dd.tar.xz
samba-6d38dba3aaa17e77b33dce4b5ba43a4da358a0dd.zip
r12533: Get the ldb.errstring() out to the user on failure. It helps a lot
with debugging! Andrew Bartlett
Diffstat (limited to 'source/scripting')
-rw-r--r--source/scripting/libjs/provision.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/scripting/libjs/provision.js b/source/scripting/libjs/provision.js
index 4cd9e5fa8dd..f26c69d15e5 100644
--- a/source/scripting/libjs/provision.js
+++ b/source/scripting/libjs/provision.js
@@ -207,8 +207,15 @@ function setup_ldb(ldif, dbname, subobj)
}
var add_ok = ldb.add(data);
- assert(add_ok);
- ldb.transaction_commit();
+ if (!add_ok) {
+ message("ldb load failed: " + ldb.errstring() + "\n");
+ assert(add_ok);
+ }
+ var commit_ok = ldb.transaction_commit();
+ if (!commit_ok) {
+ message("ldb commit failed: " + ldb.errstring() + "\n");
+ assert(add_ok);
+ }
}
/*