[Tarantool-patches] [PATCH v3] error: add __concat method to error object

Alexander Turenko alexander.turenko at tarantool.org
Wed Jan 15 14:26:39 MSK 2020


LGTM.

Just two minor comments re commit message.

WBR, Alexander Turenko.

On Fri, Jan 10, 2020 at 06:48:05PM +0300, olegrok at tarantool.org wrote:
> From: Oleg Babin <babinoleg at mail.ru>
> 
> 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(-)


More information about the Tarantool-patches mailing list