Simplified exception handling
This commit is contained in:
		@@ -114,16 +114,15 @@ void show_words() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int main() {
 | 
					int main() {
 | 
				
			||||||
    sc::term term {STDERR_FILENO};
 | 
					 | 
				
			||||||
    try {
 | 
					    try {
 | 
				
			||||||
 | 
					        sc::term term {STDERR_FILENO};
 | 
				
			||||||
        show_rows_cols(term);
 | 
					        show_rows_cols(term);
 | 
				
			||||||
        show_grayscale_bar();
 | 
					        show_grayscale_bar();
 | 
				
			||||||
        show_hue_bars();
 | 
					        show_hue_bars();
 | 
				
			||||||
        show_words();
 | 
					        show_words();
 | 
				
			||||||
        show_progress(term);
 | 
					        show_progress(term);
 | 
				
			||||||
    } catch (const std::exception& ex) {
 | 
					    } catch (const std::exception& ex) {
 | 
				
			||||||
        term.reset();
 | 
					        std::cerr << sc::io::reset << ex.what() << std::endl;
 | 
				
			||||||
        std::cerr << ex.what() << std::endl;
 | 
					 | 
				
			||||||
        return EXIT_FAILURE;
 | 
					        return EXIT_FAILURE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return EXIT_SUCCESS;
 | 
					    return EXIT_SUCCESS;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user