show up some extra info when t!() fails
This commit is contained in:
parent
237d54ff6c
commit
c716be6874
@ -1126,7 +1126,7 @@ impl Build {
|
||||
}
|
||||
|
||||
let mut paths = Vec::new();
|
||||
let contents = t!(fs::read(stamp));
|
||||
let contents = t!(fs::read(stamp), &stamp);
|
||||
// This is the method we use for extracting paths from the stamp file passed to us. See
|
||||
// run_cargo for more information (in compile.rs).
|
||||
for part in contents.split(|b| *b == 0) {
|
||||
|
@ -21,6 +21,13 @@ macro_rules! t {
|
||||
Err(e) => panic!("{} failed with {}", stringify!($e), e),
|
||||
}
|
||||
};
|
||||
// it can show extra info in the second parameter
|
||||
($e:expr, $extra:expr) => {
|
||||
match $e {
|
||||
Ok(e) => e,
|
||||
Err(e) => panic!("{} failed with {} ({:?})", stringify!($e), e, $extra),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Because Cargo adds the compiler's dylib path to our library search path, llvm-config may
|
||||
|
Loading…
x
Reference in New Issue
Block a user