Tarantool development patches archive
 help / color / mirror / Atom feed
From: Alexander Turenko <alexander.turenko@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
Cc: Imeev Mergen <imeevma@tarantool.org>,
	tarantool-patches@freelists.org, kostja@tarantool.org
Subject: [tarantool-patches] Re: [PATCH v2 1/2] lua: new function luaT_return_error()
Date: Thu, 1 Aug 2019 11:35:39 +0300	[thread overview]
Message-ID: <20190801083538.pvod64ov6mxijn67@tkn_work_nb> (raw)
In-Reply-To: <b9d972d5-0c2b-6a86-e749-2c8e6d7ab335@tarantool.org>

On Wed, Jul 31, 2019 at 07:00:44PM +0200, Vladislav Shpilevoy wrote:
> 
> 
> On 31/07/2019 18:20, Imeev Mergen wrote:
> > 
> > On 7/31/19 6:40 PM, Vladislav Shpilevoy wrote:
> >>
> >> On 31/07/2019 17:23, Alexander Turenko wrote:
> >>>> +/**
> >>>> + * Return nil as the first return value and an error as the
> >>>> + * second. The error is received using box_error_last().
> >>>> + *
> >>>> + * @param L Lua stack.
> >>>> + */
> >>>> +LUA_API int
> >>>> +luaT_return_error(lua_State *L);
> >>> Maybe let the name be a bit more explicit, say,
> >>> luaT_push_conventional_error(struct lua_State *L)?
> >>>
> >> Please, no. You work too much with Java. The name
> >> is too long. Maybe luaT_push_nil_err()?
> > I thought that luaT_error() throws an error, and this one returns
> > it. So I called it luaT_return_error(). Should I change the name
> > to luaT_push_nil_err()?
> > 
> 
> For me 'return' was ok, but seems it is not ok for Kostja and
> Alexander. Lets wait.

We already have luaT_pusherror(). 'return' term triggers me here,
because we would use two terms for the same action.

luaT_push_nil_and_error() is okay for me: it is self-explanatory and
does not introduce a new term for an existing thing.

  parent reply	other threads:[~2019-08-01  8:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31 10:32 [tarantool-patches] [PATCH v2 0/2] sql: rework error handling in box.execute() imeevma
2019-07-31 10:32 ` [tarantool-patches] [PATCH v2 1/2] lua: new function luaT_return_error() imeevma
2019-07-31 15:23   ` [tarantool-patches] " Alexander Turenko
2019-07-31 15:39     ` Konstantin Osipov
2019-07-31 15:40     ` Vladislav Shpilevoy
2019-07-31 16:20       ` Imeev Mergen
2019-07-31 17:00         ` Vladislav Shpilevoy
2019-07-31 19:33           ` Konstantin Osipov
2019-08-01  8:35           ` Alexander Turenko [this message]
2019-07-31 19:32         ` Konstantin Osipov
2019-07-31 17:15   ` Vladislav Shpilevoy
2019-07-31 22:16     ` Mergen Imeev
2019-08-01 20:03       ` Vladislav Shpilevoy
2019-08-01  8:59     ` Mergen Imeev
2019-07-31 10:32 ` [tarantool-patches] [PATCH v2 2/2] sql: rework error handling in box.execute() imeevma
2019-07-31 22:23   ` [tarantool-patches] " Mergen Imeev
2019-08-02  5:39 ` [tarantool-patches] Re: [PATCH v2 0/2] " Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190801083538.pvod64ov6mxijn67@tkn_work_nb \
    --to=alexander.turenko@tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=kostja@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --cc=v.shpilevoy@tarantool.org \
    --subject='[tarantool-patches] Re: [PATCH v2 1/2] lua: new function luaT_return_error()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox