**Use case**
Some program left garbage in terminal.

**Describe the solution you'd like**
Subset of what `reset` command does.
}
                parsed_query = ast_to_process;
                query_to_send = parsed_query->formatForErrorMessage();
                processParsedSingleQuery();
            }
            catch (...)
            
                // Some functions (e.g. protocol parsers) don't throw, but
                // set last_exception instead, so we'll also do it here for
                // uniformity.
                // Surprising client exception, because we get the
                // server exception w/o throwing (see onReceiveException()).
                client_exception = std::make_unique<Exception>(
                    getCurrentExceptionMessage(true), getCurrentExceptionCode());
                have_error = true;
            }
            if (have_error)
            
                const auto * exc_exception
                    ? server_exception.get() : client_exception.get();
                fmt::print(stderr, "Error on processing query '}': }\n",
                    ast_to_process->formatForErrorMessage(),
                    exception->message());
            }
            if (!n->isConnected())
            
                // Probably the server is dead because we found an assertion
                // failure. Fail fast.
                fmt::nnection to the server.\n");
                // Print the changed settings because they might be needed to