summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2005-12-28 03:57:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:47:52 -0500
commit5811b6dac51edb2b8fdb217c41a56c5122763157 (patch)
tree80ddb95d35f3825e90cc55ebf19cd50630bf1866
parent3fb95418fa9b4ce19e40401680339fa1e3b13286 (diff)
downloadsamba-5811b6dac51edb2b8fdb217c41a56c5122763157.tar.gz
samba-5811b6dac51edb2b8fdb217c41a56c5122763157.tar.bz2
samba-5811b6dac51edb2b8fdb217c41a56c5122763157.zip
r12533: Get the ldb.errstring() out to the user on failure. It helps a lot
with debugging! Andrew Bartlett (This used to be commit fe36cb6767ce99432e2778037aad334170dca173)
-rw-r--r--source4/scripting/libjs/provision.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/scripting/libjs/provision.js b/source4/scripting/libjs/provision.js
index 4cd9e5fa8d..f26c69d15e 100644
--- a/source4/scripting/libjs/provision.js
+++ b/source4/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);
+ }
}
/*