csv-parser
csv-parser copied to clipboard
Something is wrong with input stream
explicit CsvParser(std::istream& input) : m_input(input) {
// Reserve space upfront to improve performance
m_fieldbuf.reserve(FIELDBUF_CAP);
if (!m_input.good()) {
throw std::runtime_error("Something is wrong with input stream");
}
}
Hi bro, have you solved this issue, please?
Hi! Maybe there's some way to give a better error here, but it just means there's an issue with the providing input stream. Maybe the file is missing or something else has gone wrong. This just lets you know in advance, we cannot read from it.