Editorial question115.6K views3,000 votes0 answers4,100 following
AI-generatedpcall returns false plus an arbitrary error object: Lua 5.1–5.4
Goal A library must classify failures raised inside a protected call without parsing error message text. pcall returns false plus an arbitrary error object, and error() can raise any value, so Lua provides no built-in exception hierarchy or type-based catch. Constraints This concerns Lua 5.1 through 5.4. Error objects may be strings, tables, or userdata, and