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 6DF7146970E for ; Wed, 15 Jan 2020 14:26:36 +0300 (MSK) Date: Wed, 15 Jan 2020 14:26:39 +0300 From: Alexander Turenko Message-ID: <20200115112639.4rlwuxssjcshj65c@tkn_work_nb> References: <20200110154805.94649-1-olegrok@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200110154805.94649-1-olegrok@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v3] error: add __concat method to error object List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Oleg Babin Cc: Oleg Babin , tarantool-patches@dev.tarantool.org LGTM. Just two minor comments re commit message. WBR, Alexander Turenko. On Fri, Jan 10, 2020 at 06:48:05PM +0300, olegrok@tarantool.org wrote: > From: Oleg Babin > > Usually functions return pair {nil, err} and expected that err is string. Curly braces can be interpreted as a table. I would use an apostrophe instead. > Let's make the behaviour of error object closer to string > and define __concat metamethod. > > Closes #4489 > > The case of error "error_mt.__concat(): neither of args is an error" > is not covered by tests because of #4723 It is better to place all tags below commit message, not in the middle. The only exception is docbot comment: it should be written after tags. > --- > Changes in v3: > - Improve concatenation logic > - Add more test cases > Changes in v2: > - Added tests > > Issue: https://github.com/tarantool/tarantool/issues/4489 > Branch: olegrok/4489-concat-for-errors > > src/lua/error.lua | 11 +++++++ > test/box/misc.result | 75 +++++++++++++++++++++++++++++++++++++++++- > test/box/misc.test.lua | 24 +++++++++++++- > 3 files changed, 108 insertions(+), 2 deletions(-)