| 148 | } |
| 149 | |
| 150 | void ProgressBarImpl::tryRun_( const std::function<void ()>& task ) |
| 151 | { |
| 152 | auto maybeOk = protectedRun( task ); |
| 153 | if ( !maybeOk ) |
| 154 | { |
| 155 | onFinish_ = [msg = std::move( maybeOk.error() )] |
| 156 | { |
| 157 | showError( msg.c_str() ); |
| 158 | }; |
| 159 | } |
| 160 | } |
| 161 | |
| 162 | } //anonymous namespace |
| 163 |
no test coverage detected