Custom pcall preserving varargs
🌙 Lua•Updated 2 days ago•0 views
Wrap with a table: local vret={pcall(func,...)} then if ok return unpack(vret) end error(err) - preserves multiple return values through the error path.
How to write a pcall that returns all values
Wrap with a table: local vret={pcall(func,...)} then if ok return unpack(vret) end error(err) - preserves multiple return values through the error path.