From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [94.100.177.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 3A9BA4696C3 for ; Thu, 26 Mar 2020 03:22:52 +0300 (MSK) References: From: Vladislav Shpilevoy Message-ID: <9c60e36b-a37d-762a-9ea0-c8ea5b585690@tarantool.org> Date: Thu, 26 Mar 2020 01:22:49 +0100 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v2 04/10] box/error: introduce box.error.set() method List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikita Pettik , tarantool-patches@dev.tarantool.org 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'. After that the commit LGTM. Lets push it after this amendment.