Improve argument handling

This commit is contained in:
Jeremy Soller 2025-01-18 10:09:08 -07:00
parent 73f524c95e
commit 0ad6d5e3e0

View file

@ -96,12 +96,12 @@ pub fn main() -> Result<(), Box<dyn std::error::Error>> {
Ok(path) => match url::Url::from_file_path(&path) {
Ok(url) => Some(url),
Err(()) => {
log::warn!("failed to parse argument {:?}", arg);
log::warn!("failed to parse path {:?}", path);
None
}
},
Err(_) => {
log::warn!("failed to parse argument {:?}", arg);
Err(err) => {
log::warn!("failed to parse argument {:?}: {}", arg, err);
None
}
},