Skip to content
Snippets Groups Projects
Commit 82488b22 authored by Enric Tejedor Saavedra's avatar Enric Tejedor Saavedra Committed by Danilo Piparo
Browse files

Use std::string when calling std::runtime_error

parent f53e0199
No related branches found
No related tags found
No related merge requests found
......@@ -146,7 +146,8 @@ TCsvDS::TCsvDS(std::string_view fileName, bool readHeaders, char delimiter) // T
if (std::getline(stream, line)) {
FillHeaders(line);
} else {
auto msg = "Error reading headers of CSV file " + fileName;
std::string msg = "Error reading headers of CSV file ";
msg += fileName;
throw std::runtime_error(msg);
}
}
......@@ -203,8 +204,9 @@ const std::vector<std::pair<ULong64_t, ULong64_t>> &TCsvDS::GetEntryRanges() con
std::string TCsvDS::GetTypeName(std::string_view colName) const
{
if (!HasColumn(colName)) {
auto e = "The dataset does not have column " + colName;
throw std::runtime_error(e);
std::string msg = "The dataset does not have column ";
msg += colName;
throw std::runtime_error(msg);
}
return fColTypes.at(colName.data());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment