Example #1
0
CLuaOpt::CLuaOpt(lua_State*L, int nargs)
:L_(L),calls_(1)
{
	nopts_ = lua_gettop(L);
	if(nopts_<nargs)
    {
        std::stringstream ss;
        ss << "Missing arguments: " << nopts_ << " out of " << nargs;
        throw lua_exception(ss.str());
    }
}
Example #2
0
// We cannot clone dispatches.
Dispatch::Dispatch( const Dispatch& right ) : GrayObject( right )
{
    throw lua_exception( this->gstate->mainthread, LUA_ERRRUN, "attempt to clone a dispatch", 1 );
}