mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2025-02-17 06:57:37 +00:00
Print error cause chain on failures in build.rs
This commit is contained in:
parent
152119246e
commit
366ef8b486
@ -370,6 +370,7 @@ pub mod private {
|
||||
}
|
||||
|
||||
use crate::error::Result;
|
||||
use anyhow::anyhow;
|
||||
use std::fs;
|
||||
use std::io::{self, Write};
|
||||
use std::path::Path;
|
||||
@ -442,7 +443,7 @@ impl Build {
|
||||
match try_generate_bridge(rust_source_file.as_ref()) {
|
||||
Ok(build) => build,
|
||||
Err(err) => {
|
||||
let _ = writeln!(io::stderr(), "\n\ncxxbridge error: {}\n\n", err);
|
||||
let _ = writeln!(io::stderr(), "\n\ncxxbridge error: {:?}\n\n", anyhow!(err));
|
||||
process::exit(1);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user