From: Alex Khatskevich <avkhatskevich@tarantool.org>
To: "n.pettik" <korablev@tarantool.org>, tarantool-patches@freelists.org
Cc: Alexander Turenko <alexander.turenko@tarantool.org>,
"N. Tatunov" <hollow653@gmail.com>
Subject: [tarantool-patches] Re: [PATCH 2/2] sql: remove GLOB from Tarantool
Date: Fri, 17 Aug 2018 12:28:37 +0300 [thread overview]
Message-ID: <2898df84-5770-244b-6491-c35deca46d37@tarantool.org> (raw)
In-Reply-To: <CE81D4B5-B577-4104-AB4C-D557FF5A1302@tarantool.org>
On 17.08.2018 12:20, n.pettik wrote:
>> On 17 Aug 2018, at 12:01, Alex Khatskevich <avkhatskevich@tarantool.org> wrote:
>>
>> On 17.08.2018 11:49, n.pettik wrote:
>>>> On 17 Aug 2018, at 11:25, Alex Khatskevich <avkhatskevich@tarantool.org> wrote:
>>>>
>>>> Do not split error messages at the middle of a sentence. It makes errors ungreppable.
>>>> Make it <80 somehow different.
>>> I guess this is extremely specific nitpicking: look at src/box/alter.cc:
>>> through the code there are a lot of breaks of error messages like:
>>>
>>> alter.c : 405
>>>
>>> tnt_raise(ClientError, errcode, tt_cstr(space_name, name_len),
>>> tt_sprintf("field %d has conflicting nullability and "
>>> "nullable action properties", fieldno +
>>> TUPLE_INDEX_BASE));
>>>
>>> alter.cc : 524
>>>
>>> if (exact_field_count != 0 &&
>>> exact_field_count < field_count) {
>>> tnt_raise(ClientError, errcode, tt_cstr(name, name_len),
>>> "exact_field_count must be either 0 or >= "\
>>> "formatted field count”);
>>>
>>> etc
>> That is not a good example of code.
> Okay, then look at key_def.c and other source files. I can’t find example of breaking
> 80 chars border with error string message. Thus, I guess this rule is unlikely to be
> supported within our codestyle.
>
>> If possible, error message should not be broken at the middle.
>> In my opinion, even if it is not possible, it should better be > 80.
>>
>> Linus is for this https://www.kernel.org/doc/html/v4.10/process/coding-style.html
>
>
As I said, I do not ask anyone to break the 80 rule. I ask to do not
split the error message.
it can be done that way for example:
```
const char * const err_msg =
"ESCAPE expression must be a single character";
if (sqlite3Utf8CharLen((char *)zEsc, -1) != 1) {
sqlite3_result_error(context,
err_msg,
-1);
return;
```
next prev parent reply other threads:[~2018-08-17 9:28 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-16 17:00 [tarantool-patches] [PATCH v2 0/2] sql: pattern comparison fixes & GLOB removal N.Tatunov
2018-08-16 17:00 ` [tarantool-patches] [PATCH 1/2] sql: LIKE & GLOB pattern comparison issue N.Tatunov
2018-08-17 9:23 ` [tarantool-patches] " Alex Khatskevich
2018-08-17 11:17 ` Alexander Turenko
2018-08-17 11:42 ` Alex Khatskevich
2018-09-09 13:33 ` Nikita Tatunov
2018-09-10 22:20 ` Alex Khatskevich
2018-09-11 6:06 ` Nikita Tatunov
2018-09-11 10:06 ` Alex Khatskevich
2018-09-11 13:31 ` Nikita Tatunov
2018-10-18 18:02 ` Nikita Tatunov
2018-10-21 3:51 ` Alexander Turenko
2018-10-26 15:19 ` Nikita Tatunov
2018-10-29 13:01 ` Alexander Turenko
2018-10-31 5:25 ` Nikita Tatunov
2018-11-01 10:30 ` Alexander Turenko
2018-11-14 14:16 ` n.pettik
2018-11-14 17:06 ` Alexander Turenko
2018-08-16 17:00 ` [tarantool-patches] [PATCH 2/2] sql: remove GLOB from Tarantool N.Tatunov
2018-08-17 8:25 ` [tarantool-patches] " Alex Khatskevich
2018-08-17 8:49 ` n.pettik
2018-08-17 9:01 ` Alex Khatskevich
2018-08-17 9:20 ` n.pettik
2018-08-17 9:28 ` Alex Khatskevich [this message]
[not found] ` <04D02794-07A5-4146-9144-84EE720C8656@corp.mail.ru>
2018-08-17 8:53 ` Alex Khatskevich
2018-08-17 11:26 ` Alexander Turenko
2018-08-17 11:34 ` Alexander Turenko
2018-08-17 13:46 ` Nikita Tatunov
2018-09-09 14:57 ` Nikita Tatunov
2018-09-10 22:06 ` Alex Khatskevich
2018-09-11 7:38 ` Nikita Tatunov
2018-09-11 10:11 ` Alexander Turenko
2018-09-11 10:22 ` Alex Khatskevich
2018-09-11 12:03 ` Alex Khatskevich
2018-10-18 20:28 ` Nikita Tatunov
2018-10-21 3:48 ` Alexander Turenko
2018-10-26 15:21 ` Nikita Tatunov
2018-10-29 12:15 ` Alexander Turenko
2018-11-08 15:09 ` Nikita Tatunov
2018-11-09 12:18 ` Alexander Turenko
2018-11-10 3:38 ` Nikita Tatunov
2018-11-13 19:23 ` Alexander Turenko
2018-11-14 14:16 ` n.pettik
2018-11-14 17:41 ` Alexander Turenko
2018-11-14 21:48 ` n.pettik
2018-11-15 4:57 ` [tarantool-patches] Re: [PATCH v2 0/2] sql: pattern comparison fixes & GLOB removal 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=2898df84-5770-244b-6491-c35deca46d37@tarantool.org \
--to=avkhatskevich@tarantool.org \
--cc=alexander.turenko@tarantool.org \
--cc=hollow653@gmail.com \
--cc=korablev@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH 2/2] sql: remove GLOB from Tarantool' \
/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