Commit Graph

67 Commits

Author SHA1 Message Date
Azat Khuzhin
435e1de7b0 Remove Exception's ctor to create it from a simple string-like object
This may cause troubles, like forgetting to pass arguments, and there
are few places in the code (see the upcomming patch).

I doubt that this will make any performance changes, since the check
should be compile time.

And anyway Exception is an exceptional situation which should be rare
(there is no such code with single argument for logging, while logging
is more common).

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-24 21:26:31 +01:00
Raúl Marín
b269f87f4c Better text_log with ErrnoException 2023-12-15 19:27:56 +01:00
Alexey Milovidov
a05091be04 Miscellaneous 2023-11-13 09:06:18 +01:00
Alexey Milovidov
1432d952ac chasset will make sense for the static analyzer 2023-11-10 02:31:39 +01:00
Robert Schulze
c1b95e8b3c
Suppress error statistics update for internal exceptions 2023-09-29 10:58:44 +00:00
flynn
fcd79e49b9
Merge branch 'master' into concept 2023-08-06 21:43:26 +08:00
flynn
be0c5bf10a Use concepts to replace more std::enable_if_t
fix
2023-08-02 07:50:25 +00:00
Alexey Milovidov
e4384e104b Add a test that clickhouse-client or local do not throw/catch on startup 2023-07-17 00:06:58 +02:00
Yakov Olkhovskiy
6e769237a7 added setting 'enable_job_stack_trace', default is off 2023-06-28 01:39:06 +00:00
Yakov Olkhovskiy
f11e1c25ee added to fatal errors handler, added comments 2023-06-24 17:24:54 +00:00
Yakov Olkhovskiy
be17a81792 recursively collect call stacks on job scheduling and add all stack traces to exceptions printout 2023-06-24 00:12:31 +00:00
Alexey Milovidov
09ea79aaf7 Add support for {server_uuid} macro 2023-04-09 03:04:26 +02:00
Frank Chen
d38adfab30 Merge two overridden functions as one 2023-02-03 15:27:45 +08:00
Frank Chen
d3a05a11da Merge remote-tracking branch 'remotes/github/master' into stack_trace_in_part_log 2023-02-03 11:39:43 +08:00
Alexander Tokmakov
a584ad0eb1 forbid runtime strings 2023-01-26 10:52:47 +01:00
Alexander Tokmakov
3744fa2c63 format more messages 2023-01-25 21:16:42 +01:00
Alexander Tokmakov
d1baa7300c reformat ParsingException 2023-01-24 23:21:29 +01:00
Alexander Tokmakov
bb4c8e169f check number of parameters in format string 2023-01-23 23:16:16 +01:00
Alexander Tokmakov
3f6594f4c6 forbid old ctor of Exception 2023-01-23 22:18:05 +01:00
Frank Chen
f867c4c206 Add an overriden fromCurrentException to simply the code 2023-01-20 16:43:10 +08:00
Frank Chen
be8ceeb4bb Save stack trace in part_log 2023-01-20 16:22:40 +08:00
Alexander Tokmakov
72e8615bec formatting of some exception messages 2023-01-17 20:03:56 +01:00
Alexander Tokmakov
870cfcc36a less fmt::runtime usages 2023-01-17 00:11:59 +01:00
Alexander Tokmakov
e7899825e6 save format strings for DB::Exceptions 2023-01-16 23:20:33 +01:00
Vitaly Baranov
6c2b53f0ae
Merge pull request #42940 from filimonov/exceptions_with_masker
Add SensitiveDataMasker to exceptions messages
2022-11-21 23:20:15 +01:00
Alexey Milovidov
b4165f95a9
Merge branch 'master' into build/poco-leftovers 2022-11-16 06:09:58 +01:00
filimonov
8369998286
Style 2022-11-14 22:06:22 +01:00
Mikhail Filimonov
19d39d7881 Add SensitiveDataMasker to exceptions messages 2022-11-14 19:06:17 +01:00
Alexey Milovidov
b8c877db29 Fix annoying messages in AsynchronousMetrics 2022-11-12 19:07:28 +01:00
Azat Khuzhin
953457de28 Remove POCO_CLICKHOUSE_PATCH
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-11-10 22:41:26 +01:00
Alexey Milovidov
fa62c7e982 Fix half of trash 2022-09-10 04:08:16 +02:00
Robert Schulze
c22038d48b
More clang-tidy fixes 2022-06-28 11:50:05 +00:00
Alexander Tokmakov
6bc68c0cbc Merge branch 'master' into fixes_for_transactions 2022-05-23 18:49:21 +02:00
Alexander Tokmakov
12bbb7de87 fix race on TID allocation 2022-05-20 12:41:44 +02:00
Robert Schulze
43945cea1b
Fixing some warnings 2022-05-16 20:59:27 +02:00
Alexey Milovidov
7841f02cf0 Remove nested exception 2022-05-05 23:05:52 +02:00
Alexander Tokmakov
94af11dd74 add extra info when sending exception 2022-05-03 15:13:47 +02:00
Anton Popov
2de6668b3f show names of erroneous files 2022-04-16 00:10:47 +00:00
Antonio Andelic
9990abb76a Use compile-time check for Exception messages, fix wrong messages 2022-03-29 13:16:11 +00:00
Robert Schulze
b56c28d841
Replace a few uses of enable_if for SFINAE by concepts
- enable_if is usually regarded as fragile and unreadable

- C++20 concepts are much easier to read and produce more expressive
  error messages
2022-03-16 19:51:38 +01:00
Maksim Kita
e7772ed434 Fix clang-tidy warnings in Common folder 2022-03-14 18:17:35 +00:00
Azat Khuzhin
a09bc1d72e Add fmt::runtime() in Exception ctor
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-02-01 14:30:03 +03:00
Alexander Tokmakov
3bca886174 remove some trash 2021-09-17 22:29:10 +03:00
Raúl Marín
efe1938437 WIP: Slow improvements 2021-07-27 16:26:29 +02:00
Azat Khuzhin
7c07b43597 Convert system.errors.stack_trace from String into Array(UInt64)
This should decrease overhead for the errors collecting.
2021-03-24 06:52:48 +03:00
Azat Khuzhin
e7948819f9 Fix ParsingException::displayText()
Before it was silently try-catched for messages with additional {}, and
it is very easy to trigger, i.e.:

    SELECT toDateTime(format('{}-{}-01 00:00:00', '2021', '1'))

Will print:

    Code: 41. DB::Exception: Received from localhost:9000. DB::Exception: Cannot parse datetime 2021-1-01 00:00:00{}: Cannot parse DateTime from String: while executing 'FUNCTION toDateTime(format('{}-{}-01 00:00:00', '2021', '1') :: 3) -> toDateTime(format('{}-{}-01 00:00:00', '2021', '1')) DateTime : 2'.
2021-03-03 23:44:51 +03:00
Azat Khuzhin
e4350e078c Add ability to distinguish remote exceptions from local 2021-01-20 01:10:17 +03:00
Yatsishin Ilya
f36e8f13c0 more fixes after rebase 2020-12-24 13:48:10 +03:00
Azat Khuzhin
7c76bd2def Fix ParsingException::displayText override (guard with POCO_CLICKHOUSE_PATCH) 2020-12-23 23:55:39 +03:00
Nikita Mikhailov
84d0084c1a style 2020-12-23 01:33:07 +03:00