mirror of
https://github.com/MinetestForFun/mysql_auth.git
synced 2025-01-07 00:20:25 +01:00
Add minetest.deserialize error reporting (failed config parsing)
This commit is contained in:
parent
84fff7e863
commit
cd784a5842
5
init.lua
5
init.lua
@ -78,8 +78,11 @@ do
|
||||
if not file then
|
||||
error(modname .. ' failed to load specified config file at ' .. cfgfile)
|
||||
end
|
||||
local cfg = minetest.deserialize(file:read('*a'))
|
||||
local cfg, msg = minetest.deserialize(file:read('*a'))
|
||||
file:close()
|
||||
if not cfg then
|
||||
error(modname .. ' failed to parse specified config file at ' .. cfgfile .. ': ' .. msg)
|
||||
end
|
||||
get = function (name)
|
||||
if type(name) ~= 'string' or name == '' then
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user