| 159 | } |
| 160 | |
| 161 | std::unique_ptr<Term::Terminal> initialize_or_throw(const bool& clear_screen, const bool& disable_signal_keys, const bool& hide_cursor) { |
| 162 | if (!Term::stdin_connected() || !Term::stdout_connected()) { |
| 163 | throw Term::Exception("The terminal is not attached to a TTY and therefore can't catch user input."); |
| 164 | } |
| 165 | return std::make_unique<Term::Terminal>(clear_screen, disable_signal_keys, hide_cursor); |
| 166 | } |
| 167 | } // util |
no test coverage detected