- Ok(parser::ModulePathSuccess { path, .. }) => path,
- Err(_) => panic!("Couldn't find module {}", id),
+ Ok(parser::ModulePathSuccess { path, .. }) => Ok(path),
+ Err(_) => Err(io::Error::new(
+ io::ErrorKind::Other,
+ format!("Couldn't find module {}", id),
+ )),