From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH 2/2] info: remove false comments from src/info.h References: <20181204090224.clqmdwibpqpallva@esperanza> <82f8dcde-7dec-9509-d499-9bb25d5348de@tarantool.org> <20181204094620.qqtjjdmalic4gbmd@esperanza> From: Vladislav Shpilevoy Message-ID: <4caba0b4-8e7a-61d1-1a35-15ae36be972e@tarantool.org> Date: Tue, 4 Dec 2018 13:17:49 +0300 MIME-Version: 1.0 In-Reply-To: <20181204094620.qqtjjdmalic4gbmd@esperanza> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit To: Vladimir Davydov Cc: tarantool-patches@freelists.org List-ID: On 04/12/2018 12:46, Vladimir Davydov wrote: > On Tue, Dec 04, 2018 at 12:11:09PM +0300, Vladislav Shpilevoy wrote: >> >> >> On 04/12/2018 12:02, Vladimir Davydov wrote: >>> On Tue, Dec 04, 2018 at 12:47:06AM +0300, Vladislav Shpilevoy wrote: >>>> --- >>>> src/info.h | 7 ------- >>>> 1 file changed, 7 deletions(-) >>>> >>>> diff --git a/src/info.h b/src/info.h >>>> index 0198c31d4..cafa425e9 100644 >>>> --- a/src/info.h >>>> +++ b/src/info.h >>>> @@ -103,7 +103,6 @@ struct info_handler { >>>> /** >>>> * Starts a new document and creates root-level associative array. >>>> * @param info box.info() adapter. >>>> - * @throws C++ exception on OOM, see info.h comments. >>>> * @pre must be called once before any other functions. >>> >>> These comments are valid - info handler does throw an exception on OOM, >>> and there's a comment in src/info.h mentioning that. So I dropped this >>> patch. >>> >> >> Sorry, I though you forgot about it and pushed it by myself. > > I don't usually forget anything, and in case I do, you can ping me on > Telegram or email rather than making implicit assumptions. Understood. Sorry again. > >> >> Also, it does not throw C++ exceptions, even on OOM. > > This is the way this API was initially desgined: it may throw a Lua > exception or a C++ exception, depending on the implementation. Roman > added those comments intentionally. Yes, I saw git blame and Roman comments. But Lua error != C++ exception. It can not be caught by try-catch block. > > I guess we'd remove them anyway when we made Tarantool panic on any > malloc() failure. Ugum.