Move print_pending_errors to text_io_handler

This commit is contained in:
Twan van Laarhoven
2020-04-20 23:04:38 +02:00
parent b283a02d2f
commit b8c5a312e6
4 changed files with 20 additions and 14 deletions
+2 -10
View File
@@ -99,7 +99,7 @@ bool run_script_file(String const& filename) {
void CLISetInterface::run() {
// show welcome logo
if (!quiet) showWelcome();
print_pending_errors();
cli.print_pending_errors();
// loop
running = true;
while (running) {
@@ -112,7 +112,7 @@ void CLISetInterface::run() {
String command = cli.getLine();
if (command.empty() && !cli.canGetLine()) break;
handleCommand(command);
print_pending_errors();
cli.print_pending_errors();
cli.flush();
cli.flushRaw();
}
@@ -260,11 +260,3 @@ void CLISetInterface::handleCommand(const String& command) {
}
}
#endif
void CLISetInterface::print_pending_errors() {
MessageType type;
String msg;
while (get_queued_message(type,msg)) {
cli.show_message(type,msg);
}
}