Closed BThacker closed 1 year ago
Suggestions:
ValueError
- why not any Exception
?self.skipped_records = 0
in the reader class init and increment it when handling an exceptionAdded skipped records to the base reader, added all exceptions to the catch (good point)
Dropped the multiple return types and just incremented the counter instead. Consuming modules can check the skipped record value and then log based on that.
removed the unnecessary var creation, direct to yield
The idea behind this is to simply try catch the init of FlowRecord, and if an exception is caught, increment the "skipped_records" field of the basereader class. This value can then be checked and logged in the consuming class for further investigation if warranted. Also added an override during class init to raise the exception instead.