You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Troubleshooting file parsing can be rather difficult and sometimes it is reasonable accept errors when parsing with the higher goal of being able to read the file at all. I think as a principle the API should be lenient while reading and strict while writing.
All the same, it would be useful to output errors found while parsing to stderr and the structured way to do this is to use a logging API.
Should we introduce log and start logging parsing errors and other events?
Impact is minimal and the API user can chose how to output messages with a multitude of log implementations. For development of fitsrs we should probably use e.g. test-log to get the relevant output in unit tests.
The text was updated successfully, but these errors were encountered:
An example of the actual need is that one of the test files is missing a closing single quote for a string.
PR #16 treats this as Card::Undefined and gets on with the work, but it would be better if we reported the issue on stderr.
This way the issue becomes visible and there is an impetus to improve the fitsrs parsing if the value actually should be considered valid, or perhaps to ask the producer of the file to fix it, if it really is an error in the source file.
Hi,
Troubleshooting file parsing can be rather difficult and sometimes it is reasonable accept errors when parsing with the higher goal of being able to read the file at all. I think as a principle the API should be lenient while reading and strict while writing.
All the same, it would be useful to output errors found while parsing to
stderr
and the structured way to do this is to use a logging API.Should we introduce log and start logging parsing errors and other events?
Impact is minimal and the API user can chose how to output messages with a multitude of log implementations. For development of
fitsrs
we should probably use e.g. test-log to get the relevant output in unit tests.The text was updated successfully, but these errors were encountered: