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

Function finish_error

atomic-cli/src/output/progress.rs:283–286  ·  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

281/// }
282/// ```
283pub 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

Callers 5

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

Calls 1

error_styleFunction · 0.85

Tested by 1

test_finish_errorFunction · 0.68