Finish a progress bar with an error message. This clears the progress bar and displays an error message in red. # Arguments `pb` - The progress bar to finish `message` - The error message to display # Example ```rust,ignore let spinner = progress::create_spinner("Connecting..."); if let Err(e) = connect() { progress::finish_error(&spinner, &format!("Connection failed: {}", e)); } ```
(pb: &ProgressBar, message: &str)
| 281 | /// } |
| 282 | /// ``` |
| 283 | pub fn finish_error(pb: &ProgressBar, message: &str) { |
| 284 | pb.set_style(error_style()); |
| 285 | pb.finish_with_message(message.to_string()); |
| 286 | } |
| 287 | |
| 288 | // Progress Styles |
| 289 |