-
Notifications
You must be signed in to change notification settings - Fork 286
New issue
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
Include filename in warning message when parsing of values fails #581
Comments
I agree that this is good practice |
Ideally we should also include the filename if there are any errors |
I started working on this, it is going to require quite extensive changes to implement as none of the collectors or parsers store the filename information. We need to think about what internal objects should store the filename information and which should not. In particular I am pretty sure we need to avoid including the filename in the Token object, as that would likely slow parsing considerably. |
What if we did this at the R level by wrapping the condition raised in C++? |
That would work, I can give it a try. |
Turns out it was even easier than using exceptions, we can just add the filename to the problems attribute directly, should have thought of that first! |
I read a large number of files using lapply and read_csv with fixed coltypes:
Occasionally there is a non-numeric entry in a column that should parse as double and I get a warning message like this:
However, from this warning I do not know in which of the dozens, sometimes hundreds of files the parsing failed.
Would it be possible to include the filename for the failed parsing in the warning message?
The text was updated successfully, but these errors were encountered: