Improve lmdb error reporting.