I prefer if function returns error instead raise Lua errors.
E.g. if i get info from untrasted source I want return either info or error message.
Now I have to use pcall for such thing.
I like way how it was implemented in cjson library.
It just provide 2 module cjson and cjson.safe.
I prefer if function returns error instead raise Lua errors.
E.g. if i get info from untrasted source I want return either info or error message.
Now I have to use
pcallfor such thing.I like way how it was implemented in
cjsonlibrary.It just provide 2 module
cjsonandcjson.safe.