From 88811f7c818296e16e348a11ab38f2706c028678 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Mon, 13 Dec 2021 13:40:59 +0100 Subject: [PATCH] Simplified exception handling --- progress.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/progress.cpp b/progress.cpp index 71ef1a7..2636165 100644 --- a/progress.cpp +++ b/progress.cpp @@ -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;