[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Error handling in C++
- From: Max Ischenko <max@...>
- Date: Wed, 25 Jun 2003 15:06:10 +0300
I've read the Lua manual, but still not sure about the following code:
int errcode = luaL_loadfile(L, filename);
if (errcode > 0)
{
const char* msg = lua_tostring(L, -1);
lua_pop(L, 1);
throw LuaError(msg);
}
Does Lua guarantee that LuaError would be instantiated with valid msg
string or I should copy it before doing lua_pop?