aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/Paragraphs.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-03-13 17:38:04 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-03-13 17:56:21 -0700
commit4114d87a0774fff7d8bc5e041bb56158bfdbcac8 (patch)
tree5afcf15a4de03e9294e5fe3b301cdc902b01ddd6 /toolsrc/src/Paragraphs.cpp
parent98ea6780e7a4af7d237783a72a2a56a6188ae3da (diff)
downloadvcpkg-4114d87a0774fff7d8bc5e041bb56158bfdbcac8.tar.gz
vcpkg-4114d87a0774fff7d8bc5e041bb56158bfdbcac8.zip
All Checks now take LineInfo as the first argument
Diffstat (limited to 'toolsrc/src/Paragraphs.cpp')
-rw-r--r--toolsrc/src/Paragraphs.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/toolsrc/src/Paragraphs.cpp b/toolsrc/src/Paragraphs.cpp
index cb90ed1ec..f1505698c 100644
--- a/toolsrc/src/Paragraphs.cpp
+++ b/toolsrc/src/Paragraphs.cpp
@@ -99,7 +99,7 @@ namespace vcpkg::Paragraphs
auto begin_fieldname = cur;
while (is_alphanum(ch) || ch == '-')
next(ch);
- Checks::check_exit(ch == ':', "Expected ':'");
+ Checks::check_exit(VCPKG_LINE_INFO, ch == ':', "Expected ':'");
fieldname = std::string(begin_fieldname, cur);
// skip ': '
@@ -117,7 +117,7 @@ namespace vcpkg::Paragraphs
get_fieldname(ch, fieldname);
auto it = fields.find(fieldname);
- Checks::check_exit(it == fields.end(), "Duplicate field");
+ Checks::check_exit(VCPKG_LINE_INFO, it == fields.end(), "Duplicate field");
get_fieldvalue(ch, fieldvalue);
@@ -158,7 +158,7 @@ namespace vcpkg::Paragraphs
return parse_paragraphs(*spgh);
}
- Checks::exit_with_message("Error while reading %s: %s", control_path.generic_string(), contents.error_code().message());
+ Checks::exit_with_message(VCPKG_LINE_INFO, "Error while reading %s: %s", control_path.generic_string(), contents.error_code().message());
}
std::vector<std::unordered_map<std::string, std::string>> parse_paragraphs(const std::string& str)
@@ -171,7 +171,7 @@ namespace vcpkg::Paragraphs
try
{
auto pghs = get_paragraphs(path / "CONTROL");
- Checks::check_exit(pghs.size() == 1, "Invalid control file at %s\\CONTROL", path.string());
+ Checks::check_exit(VCPKG_LINE_INFO, pghs.size() == 1, "Invalid control file at %s\\CONTROL", path.string());
return SourceParagraph(pghs[0]);
}
catch (std::runtime_error const&) {}
@@ -192,7 +192,7 @@ namespace vcpkg::Paragraphs
pghs = parse_paragraphs(*control_contents);
}
catch (std::runtime_error) {}
- Checks::check_exit(pghs.size() == 1, "Invalid control file at %s", path.string());
+ Checks::check_exit(VCPKG_LINE_INFO, pghs.size() == 1, "Invalid control file at %s", path.string());
return BinaryParagraph(pghs[0]);
}
return control_contents_maybe.error_code();