holicovrazvan1 / parsecsv-for-php

Automatically exported from code.google.com/p/parsecsv-for-php
MIT License
0 stars 0 forks source link

Report error when row fails conditional check #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is an enhancement request to allow the developer to track the lines
that fail the conditional check instead of just ignoring them. Suggest
adding a $rejected array variable that will store all of the lines in the
file that did not meet the conditional check. This will allow the developer
to report the failures to the end user so they will know what needs to be
corrected in the file.

What steps will reproduce the problem?
1. Create new parser object
2. Set conditional on parser
3. Parse file that contains a line which fails the conditional

What is the current response?
$data array contains all lines from file that passed conditional checks.
Lines that failed the conditional check are not stored in any variable for
reference.

What is the desired response?
$rejected array is populated with the line(s) that failed the conditional
check. Entry should contain the entire record contents, as well as which
conditional check failed.

Original issue reported on code.google.com by wufpac...@gmail.com on 21 Aug 2008 at 1:34

GoogleCodeExporter commented 9 years ago
Very good point, I honestly don't know I never thought of 
implimenting this myself... lol

I'll try to find some time in the next week to at least partially 
impliment this :)

Original comment by zynode on 22 Aug 2008 at 6:43