[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Jumping out of a function without error semantics
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 28 Jan 2013 18:48:02 -0200
> Given that we use lua_error for our abort semantics, and probably soon to be our commit, too, is there a good programming pattern that can be used to ensure that Lua cannot 'fake' one of these calls using error(?), forcing them to always go through our interface? Would a piece of user data on the stack prior to lua_error do the trick?
Most probably. But note that you'll need to be able to compare the Lua value
raised as an error with your special value, so perhaps it's best to store
that value in the registry.