Catch no number exception
This commit is contained in:
		@@ -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]<typename T0>(T0 &&arg) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user