Macro error_named
Source macro_rules! error_named {
($cmd:expr, $msg:expr $(,$val:expr)*) => { ... };
}
Expand description
Prints out an error message with a command name, like println!
ยงExample
fn my_cd(action: &mut (), name: &str, args: &[&str]) -> zsh_module::MaybeError {
if args.len() > 1 {
zsh_module::error_named!(name, "too much arguments!");
return Err(todo!())
}
todo!()
}