forked from minetest-mods/xban2
Better diagnostics in case of DB load error.
This commit is contained in:
parent
877e550787
commit
97fb251ad9
4
init.lua
4
init.lua
@ -361,10 +361,10 @@ local function load_db()
|
|||||||
WARNING("Unable to load database: %s", "Read failed")
|
WARNING("Unable to load database: %s", "Read failed")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local t = minetest.deserialize(cont)
|
local t, e = minetest.deserialize(cont)
|
||||||
if not t then
|
if not t then
|
||||||
WARNING("Unable to load database: %s",
|
WARNING("Unable to load database: %s",
|
||||||
"Deserialization failed")
|
"Deserialization failed: "..(e or "unknown error"))
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
db = t
|
db = t
|
||||||
|
Loading…
Reference in New Issue
Block a user