1
Fork 0

Have "aborting due to previous errors" message show an error count

This commit is contained in:
Lindsey Kuper 2012-06-04 16:51:45 -07:00
parent 99d6807ee0
commit 1a3b8fc43c
2 changed files with 4 additions and 2 deletions

View file

@ -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;
}

View file

@ -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) {