Cleanup some error messages.

This CL makes it clearer where errors are coming from and fixes the
source information on a few type determiner error messages.

Change-Id: I356518ac3004effe005bb7dea147c7fe442ab1a8
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/20063
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
dan sinclair
2020-04-21 13:05:42 +00:00
committed by dan sinclair
parent aac5865121
commit 7025918287
4 changed files with 74 additions and 39 deletions

View File

@@ -288,7 +288,7 @@ int main(int argc, const char** argv) {
return 1;
}
if (!reader->Parse()) {
std::cerr << reader->error() << std::endl;
std::cerr << "Parse: " << reader->error() << std::endl;
return 1;
}
@@ -307,13 +307,13 @@ int main(int argc, const char** argv) {
tint::TypeDeterminer td(&ctx, &mod);
if (!td.Determine()) {
std::cerr << td.error() << std::endl;
std::cerr << "Type Determination: " << td.error() << std::endl;
return 1;
}
tint::Validator v;
if (!v.Validate(mod)) {
std::cerr << v.error() << std::endl;
std::cerr << "Validation: " << v.error() << std::endl;
return 1;
}