lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I rather new to Lua, and have slowly progressed to the point of successfully integrating C++ and Lua via Swig, and have a 3D app running with an init and frame being all controlled from Lua scripts.  Still rather simple scripts and simple C++ classes but progress no less. 

The bit I'm currently perplexed by is how to report back errors that occur in the Lua scripts - when errors, in my C++ code I have:

   int result = luaL_dofile(L, "frame.lua");

And when the script runs fine I get a 0, and when there is an error I get 1, which is all go so far, but... where do I go next to report the details of the error, such as the line number, and the error message?  I have searched the lua websites and headers and can't find anything to point me in the right direction.

Thanks in advance for you help,
Robert.