[tarantool-patches] Re: [PATCH v1 2/3] sql: rework diag_set() in OP_Halt
n.pettik
korablev at tarantool.org
Mon Apr 29 02:35:29 MSK 2019
> On 26 Apr 2019, at 10:48, Mergen Imeev <imeevma at tarantool.org> wrote:
>
> On Mon, Apr 15, 2019 at 06:21:55PM +0300, n.pettik wrote:
>>
>>
>>> On 12 Apr 2019, at 15:34, imeevma at tarantool.org wrote:
>>>
>>> Before this patch it was possible to have an error code with wrong
>>> error description. This patch fixes it.
>>
>> Could you please supply this statement with an example(s)?
>>
> I changed the commit message. In fact, I found an error that had
> no error code at all:
Could you fix that?
> ...
>
> tarantool> box.execute('select 1 limit true')
> ---
> - error: Only positive integers are allowed in the LIMIT clause
> ...
>
> tarantool> box.error.last().code
> ---
> - 0
> ...
>
>
> I still think it would be better to use P3 instead of P5.
Does it matter?
>
>
> New patch:
>
> From 4c1ad4e67773232168f13b0d501f4476673b57c6 Mon Sep 17 00:00:00 2001
> Date: Fri, 12 Apr 2019 14:16:18 +0300
> Subject: [PATCH] sql: rework diag_set() in OP_Halt
>
> Prior to this patch, the way to set Tarantool error in OP_Halt was
> too universal. It was possible to set a description of the error
> that does not match its errcode. This change will also make it
> easier to work with an error in OP_Halt, since you no longer need
> to create a complete error message.
Please, inline exactly the same example as you shown
in previous mail.
More information about the Tarantool-patches
mailing list