Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

CSVParser and user_error


Go to End


538 Views

Avatar
JonShutt

Community Member, 244 Posts

26 August 2013 at 4:30pm

Hi folks,

I'm using the CSVParser class to handle a CSV file, mostly fine, but if the CSV has the wrong number of items in a row, it creates a 'user_error', resulting a blue blue screen...

2 questions:

Does anyone know of a way of checking the column rows in the CSV before asking CSVParser to parse the file

Does anyone know of a way of taking a generated 'user_error' and presenting it nicely to the user, rather than dying on a big blue screen!

Or - or the CSVParser class just not up to it, and should I be using CsvBulkLoader instead?