MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / error

Function error

cli/src/ui.rs:99–105  ·  view source on GitHub ↗

Render an error to stderr. `{:#}` joins the cause chain so the root reason isn't swallowed.

(e: &anyhow::Error)

Source from the content-addressed store, hash-verified

97
98/// Render an error to stderr. `{:#}` joins the cause chain so the root reason isn't swallowed.
99pub fn error(e: &anyhow::Error) {
100 if plain() {
101 eprintln!("error: {e:#}");
102 } else {
103 eprintln!("{} {e:#}", "error:".red());
104 }
105}
106
107// Braille frames used by the spinner; match the rest of the UI's unicode style.
108const SPIN_FRAMES: &[&str] = &["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];

Callers 1

mainFunction · 0.85

Calls 1

plainFunction · 0.85

Tested by

no test coverage detected