[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Reporting error messages
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Thu, 11 May 2006 17:10:22 -0300
> >
> > int result = luaL_dofile(L, "frame.lua");
> >
>
> You should first load you script, and then run it with
> lua_pcall(). This way you can catch errors and report them.
That's what luaL_dofile does. If result is not 0, then the error message
is at the top of the stack and can b retrieved with lua_tostring(L,-1).
--lhf