mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 04:19:00 +08:00
[vcpkg] Improve error messages during Binary Paragraph parsing
This commit is contained in:
parent
7b33a26c89
commit
d5659ea88d
@ -56,8 +56,10 @@ namespace vcpkg
|
||||
this->default_features = parse_comma_list(parser.optional_field(Fields::DEFAULTFEATURES));
|
||||
}
|
||||
|
||||
if (auto err = parser.error_info(this->spec.name()))
|
||||
if (auto err = parser.error_info(this->spec.to_string()))
|
||||
{
|
||||
System::println(
|
||||
System::Color::error, "Error: while parsing the Binary Paragraph for %s", this->spec.to_string());
|
||||
print_error_message(err);
|
||||
Checks::exit_fail(VCPKG_LINE_INFO);
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ namespace vcpkg
|
||||
if (!error_info->extra_fields.empty())
|
||||
{
|
||||
System::println(System::Color::error,
|
||||
"Error: There are invalid fields in the Source Paragraph of %s",
|
||||
"Error: There are invalid fields in the control file of %s",
|
||||
error_info->name);
|
||||
System::println("The following fields were not expected:\n\n %s\n",
|
||||
Strings::join("\n ", error_info->extra_fields));
|
||||
@ -74,7 +74,7 @@ namespace vcpkg
|
||||
if (!error_info->missing_fields.empty())
|
||||
{
|
||||
System::println(System::Color::error,
|
||||
"Error: There are missing fields in the Source Paragraphs of %s",
|
||||
"Error: There are missing fields in the control file of %s",
|
||||
error_info->name);
|
||||
System::println("The following fields were missing:\n\n %s\n",
|
||||
Strings::join("\n ", error_info->missing_fields));
|
||||
|
Loading…
Reference in New Issue
Block a user