From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id C6FD42B90C for ; Sun, 28 Apr 2019 19:35:31 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Uoo62aD5MIo6 for ; Sun, 28 Apr 2019 19:35:31 -0400 (EDT) Received: from smtp49.i.mail.ru (smtp49.i.mail.ru [94.100.177.109]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 852342B8E1 for ; Sun, 28 Apr 2019 19:35:31 -0400 (EDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: [tarantool-patches] Re: [PATCH v1 2/3] sql: rework diag_set() in OP_Halt From: "n.pettik" In-Reply-To: <20190426074808.GC23413@tarantool.org> Date: Mon, 29 Apr 2019 02:35:29 +0300 Content-Transfer-Encoding: 7bit Message-Id: <353E4E8B-DA71-4F64-8A61-4E89151E7B5B@tarantool.org> References: <79e3d0e51a64bf35cf5b505d2541996f60b02b8c.1555072183.git.imeevma@gmail.com> <28C698E1-979F-4148-942E-38DCAE4AE0DD@tarantool.org> <20190426074808.GC23413@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org Cc: Imeev Mergen > On 26 Apr 2019, at 10:48, Mergen Imeev wrote: > > On Mon, Apr 15, 2019 at 06:21:55PM +0300, n.pettik wrote: >> >> >>> On 12 Apr 2019, at 15:34, imeevma@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.