lua-users home
lua-l archive

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


Greetings.

I would like to trap any errors that may occur in a lua_dofile call. Is
this possible? For instance, let's say that the file called in
lua_dofile has a syntax error:

if 1 == 1 then
	print("hi")
en

... en/end ... how can I know if the lua_dofile was successful? If not,
can I retrieve error information such as "Syntax error on line 3." ?

Thanks,

----
jeremy <jc@cowgar.com>

jeremy@myhome $ ./think
Segmentation Fault