[Tarantool-patches] [PATCH v2 04/10] box/error: introduce box.error.set() method

Nikita Pettik korablev at tarantool.org
Thu Mar 26 15:31:07 MSK 2020


On 26 Mar 01:22, Vladislav Shpilevoy wrote:
> 
> 
> On 25/03/2020 02:43, Nikita Pettik wrote:
> > box.error.set(err) sets err to instance's diagnostics area. Argument err
> > is supposed to be instance of error object. This method is required
> > since we are going to avoid adding created via box.error.new() errors to
> > Tarantool's diagnostic area.
> > 
> > Needed for #1148
> > Part of #4778
> > ---
> >  src/box/lua/error.cc    | 14 ++++++++++++++
> >  src/lua/error.c         |  2 +-
> >  src/lua/error.h         |  3 +++
> >  test/box/error.result   | 36 ++++++++++++++++++++++++++++++++++++
> >  test/box/error.test.lua | 15 +++++++++++++++
> >  5 files changed, 69 insertions(+), 1 deletion(-)
> > 
> > diff --git a/src/box/lua/error.cc b/src/box/lua/error.cc
> > index fc53a40f4..640e33910 100644
> > --- a/src/box/lua/error.cc
> > +++ b/src/box/lua/error.cc
> > @@ -154,6 +154,16 @@ luaT_error_clear(lua_State *L)
> >  	return 0;
> >  }
> >  
> > +static int
> > +luaT_error_set(lua_State *L)
> 
> Better specify 'struct' before 'lua_State'.

Ok, fixed.
 
> After that the commit LGTM. Lets push it after this
> amendment.

Pushed to master.



More information about the Tarantool-patches mailing list