We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The CSVFormat object is below
CSVFormat csvFileFormat; csvFileFormat.column_names("name,age"); csvFileFormat.strict_parsing();
The data in csv file is like
A,10 B,5000 C,30 D,100 E,100,5000
Note that the fifth row has three columns.
I am creating a csv reader object but it is not catching the std::runtime_error during the csv reader object creation
try { CSVReader reader(filePath,csvFileFormat); }catch(std::runtime_error& e){ std::cout << "Error" << std::endl; }
My main motive is to get all the malformed records present inside the csv file so that I can write those malformed records in a separate file.
The text was updated successfully, but these errors were encountered:
Errors with data will be thrown while reading the data. but currently errors are only thrown for missing quotes (maybe I should document that better).
You can read http://vincela.com/csv/md_docs_source_variable_row_lengths.html to see how to get malformed records. I'm not sure if I like the current API for doing so, so let me know how you feel.
Sorry, something went wrong.
Malformed row handling will be made easier by #66
No branches or pull requests
The CSVFormat object is below
The data in csv file is like
A,10
B,5000
C,30
D,100
E,100,5000
Note that the fifth row has three columns.
I am creating a csv reader object but it is not catching the std::runtime_error during the csv reader object creation
My main motive is to get all the malformed records present inside the csv file so that I can write those malformed records in a separate file.
The text was updated successfully, but these errors were encountered: