lua-users home
lua-l archive

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


> 
> - use luaL_error instead of lua_pushstring+lua_error in two places:
> 	lua_pushstring(L, "invalid adjacent constant value");
> 	lua_error(L);
> 
> 	lua_pushstring(L, "invalid measure constant value");
> 	lua_error(L);
> 

Instead of 'lua_error(L)' I would prefer 'return lua_error(L)' in general (applies also to 'luaL_error'). Because it tells the casual code reader that execution ends there. See also [1]

Thijs

[1] http://lua-users.org/lists/lua-l/2012-04/msg00746.html