I'm writing a Rust program which will create a directory based on user input. I would like to know how to panic with my own text when error occurs, like Permission Error etc...
fn create_dir(path: &String) -> std::io::Result<()> {
std::fs::create_dir_all(path)?;
Ok(())
}
This will do nothing when error occcurs