Use lua_pcall when you need to handle potential errors at this point in the code. Otherwise, use lua_call and let the error move up the call chain. No need to get paranoid using lua_pcall everywhere.
lua_call faster than lua_pcall .
Just make sure there is at least one lua_pcall at the top, or your application will panic and exit if any Lua errors are detected.
source share