summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/db.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/db.lua b/server/db.lua
index a4cd8a7..4a6e6d3 100644
--- a/server/db.lua
+++ b/server/db.lua
@@ -1,14 +1,14 @@
local lmdb = require'lmdb'
-local env = lmdb.open('data',{maxdbs=16})
+local env = assert(lmdb.open('data',{maxdbs=16}))
local function get_db(dbname, writeable)
-- shortcut
if writeable == nil then writeable = false end
- local txn = assert(env:txn_begin(writeable),"couldn't begin txn")
- local the_db = assert(txn:open(dbname), "couldn't open db")
+ local txn = assert(env:txn_begin(writeable))
+ local the_db = assert(txn:open(dbname))
return txn,the_db
end
local function txn(writeable)
- return assert(env:txn_begin(writeable), "couldn't begin txn")
+ return assert(env:txn_begin(writeable))
end