💬

Community answer

Collected from the ACE community Discord archive around 2017-03-04. It may be informal or outdated — anyone can edit this page to improve it. Original discussion

Custom pcall preserving varargs

🌙 LuaUpdated 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.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.