[tarantool-patches] Re: [PATCH v2 1/2] lua: new function luaT_return_error()

Imeev Mergen imeevma at tarantool.org
Wed Jul 31 19:20:49 MSK 2019


On 7/31/19 6:40 PM, Vladislav Shpilevoy wrote:
>
> On 31/07/2019 17:23, Alexander Turenko wrote:
>>> +/**
>>> + * Return nil as the first return value and an error as the
>>> + * second. The error is received using box_error_last().
>>> + *
>>> + * @param L Lua stack.
>>> + */
>>> +LUA_API int
>>> +luaT_return_error(lua_State *L);
>> Maybe let the name be a bit more explicit, say,
>> luaT_push_conventional_error(struct lua_State *L)?
>>
> Please, no. You work too much with Java. The name
> is too long. Maybe luaT_push_nil_err()?
I thought that luaT_error() throws an error, and this one returns
it. So I called it luaT_return_error(). Should I change the name
to luaT_push_nil_err()?





More information about the Tarantool-patches mailing list