macro_rules! error_context {
(error: $err:expr) => { ... };
(error: $err:expr, suggestion: $sug:expr) => { ... };
(error: $err:expr, suggestion: $sug:expr, details: $det:expr) => { ... };
(error: $err:expr, details: $det:expr) => { ... };
}Expand description
Macro for creating custom error contexts quickly
ยงExample
use agpm_cli::{error_context, core::AgpmError};
let context = error_context! {
error: AgpmError::Other { message: "Operation failed".to_string() },
suggestion: "Try again later",
details: "Additional information"
};