diff options
author | Andrew Bartlett <abartlet@samba.org> | 2005-12-28 03:57:26 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2005-12-28 03:57:26 +0000 |
commit | 6d38dba3aaa17e77b33dce4b5ba43a4da358a0dd (patch) | |
tree | 25fc459e19f8ea6395e426d9d5e67bafa10f68ac /source/scripting | |
parent | eb17a6a21533c9de8e94c98eddce8e46ce4e3f3f (diff) | |
download | samba-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.js | 11 |
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); + } } /* |