Simplified exception handling

This commit is contained in:
Bob Polis 2021-12-13 13:40:59 +01:00
parent e25fa94325
commit 88811f7c81

View File

@ -114,16 +114,15 @@ void show_words() {
}
int main() {
sc::term term {STDERR_FILENO};
try {
sc::term term {STDERR_FILENO};
show_rows_cols(term);
show_grayscale_bar();
show_hue_bars();
show_words();
show_progress(term);
} catch (const std::exception& ex) {
term.reset();
std::cerr << ex.what() << std::endl;
std::cerr << sc::io::reset << ex.what() << std::endl;
return EXIT_FAILURE;
}
return EXIT_SUCCESS;