diff --git a/src/Tui.cpp b/src/Tui.cpp index 7d9de07..855f52a 100644 --- a/src/Tui.cpp +++ b/src/Tui.cpp @@ -54,7 +54,14 @@ void Tui::run() { for (;;) { std::cout << "Enter a command: "; std::flush(std::cout); - const Command::Command command = Command::readCommand(); + Command::Command command; + try { + command = Command::readCommand(); + } catch (const Command::NoNumberException &e) { + std::cout << e.what() << std::endl; + continue; + } + bool should_exit = false; auto visitor = [this, &should_exit](T0 &&arg) {