Lua Programming/How to Lua/error handling

Execution Errors

When an execution error occurs in a lua script, execution returns to the caller programme for appropriate action to be taken.

Explicit error generation

The error function can be used to generate an explicit error status.

Error trap

The pcall function can be used as an error trap.

Last modified on 9 February 2011, at 02:32