cli: Include file path in WGSL parse error

This commit is contained in:
rhysd
2022-01-29 21:49:51 +09:00
committed by Dzmitry Malyshau
parent 0afa8fcb4f
commit f98053aa3c

View File

@@ -281,7 +281,8 @@ fn run() -> Result<(), Box<dyn std::error::Error>> {
match result {
Ok(v) => (v, Some(input)),
Err(ref e) => {
e.emit_to_stderr(&input);
let path = input_path.to_string_lossy();
e.emit_to_stderr_with_path(&input, &path);
return Err(CliError("Could not parse WGSL").into());
}
}