MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / finish_error

Function finish_error

atomic-cli/src/output/progress.rs:303–307  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

301/// }
302/// ```
303pub fn finish_error(pb: &ProgressBar, message: &str) {
304 pb.set_style(error_style());
305 pb.finish_with_message(message.to_string());
306 emit_if_hidden(pb, "✗", message);
307}
308
309// Progress Styles
310

Callers 5

run_asyncMethod · 0.85
run_asyncMethod · 0.85
runMethod · 0.85
run_asyncMethod · 0.85
test_finish_errorFunction · 0.85

Calls 2

error_styleFunction · 0.85
emit_if_hiddenFunction · 0.85

Tested by 1

test_finish_errorFunction · 0.68