MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / processError

Method processError

programs/local/LocalServer.cpp:291–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289}
290
291void LocalServer::processError(std::string_view) const
292{
293 if (ignore_error)
294 return;
295
296 if (is_interactive)
297 {
298 String message;
299 if (server_exception)
300 {
301 message = getExceptionMessageForLogging(*server_exception, print_stack_trace, true);
302 }
303 else if (client_exception)
304 {
305 message = client_exception->message();
306 }
307
308 /// musl defines `stderr` as `(stderr)` which triggers `-Wdisabled-macro-expansion`.
309#pragma clang diagnostic push
310#pragma clang diagnostic ignored "-Wdisabled-macro-expansion"
311 fmt::print(stderr, "Received exception:\n{}\n", message);
312 fmt::print(stderr, "\n");
313#pragma clang diagnostic pop
314 }
315 else
316 {
317 if (server_exception)
318 server_exception->rethrow();
319 if (client_exception)
320 client_exception->rethrow();
321 }
322}
323
324
325void LocalServer::initialize(Poco::Util::Application & self)

Callers

nothing calls this directly

Calls 4

printFunction · 0.50
messageMethod · 0.45
rethrowMethod · 0.45

Tested by

no test coverage detected