Fix init.lua functions to do what is documented on error
This commit is contained in:
parent
a6e8b8b435
commit
2e281b134b
4
init.lua
4
init.lua
|
@ -57,6 +57,7 @@ function serialize_lib.read_table_from_file(filename)
|
|||
local succ, ret = pcall(ser.read_from_file, filename)
|
||||
if not succ then
|
||||
serialize_lib.log_error(ret)
|
||||
return false,ret
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
@ -67,8 +68,9 @@ function serialize_lib.write_table_to_file(root_table, filename)
|
|||
local succ, ret = pcall(ser.write_to_file, root_table, filename)
|
||||
if not succ then
|
||||
serialize_lib.log_error(ret)
|
||||
return false,ret
|
||||
end
|
||||
return ret
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue