Have "aborting due to previous errors" message show an error count
This commit is contained in:
parent
99d6807ee0
commit
1a3b8fc43c
2 changed files with 4 additions and 2 deletions
|
@ -266,7 +266,7 @@ fn check_expected_errors(expected_errors: [errors::expected_error],
|
|||
}
|
||||
|
||||
// ignore this msg which gets printed at the end
|
||||
if str::contains(line, "aborting due to previous errors") {
|
||||
if str::contains(line, "aborting due to") {
|
||||
was_expected = true;
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,9 @@ impl codemap_handler of handler for handler_t {
|
|||
fn has_errors() -> bool { self.err_count > 0u }
|
||||
fn abort_if_errors() {
|
||||
if self.err_count > 0u {
|
||||
self.fatal("aborting due to previous errors");
|
||||
let s = #fmt["aborting due to %u previous errors",
|
||||
self.err_count];
|
||||
self.fatal(s);
|
||||
}
|
||||
}
|
||||
fn warn(msg: str) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue