-use core::errors::{CargoResult,CargoError,MissingManifest};
+use util::{other_error,CargoResult,CargoError};
pub fn find_project(pwd: Path, file: ~str) -> CargoResult<Path> {
let mut current = pwd.clone();
if !current.pop() { break; }
}
- Err(CargoError::internal(MissingManifest(pwd, file)))
+ Err(manifest_missing_err(&pwd, file.as_slice()))
+}
+
+fn manifest_missing_err(pwd: &Path, file: &str) -> CargoError {
+ other_error("manifest not found")
+ .with_detail(format!("pwd={}; file={}", pwd.display(), file))
}