Some minor modifications relating to exception handling - thiscode/CsvHelper GitHub Wiki
Some of the methods in CsvReader did not set the "currentIndex". In combination with "ConvertUsing" and "GetRecord" lead this to wrong excpetion messages. For example:
Map(m => m.IntColumn).Name("Height").ConvertUsing<int>(
x => Convert.ToInt32(Math.Round(x.GetField<decimal>("Height"), 0))
);
If this expression would fail, the exception message would point to another column. This is very puzzling.
Another addition is to include the message from the inner exception into the message produced by the ExceptionHelper and prevent exceptions within if currentIndex is -1. Both of them fetures is very important if you work with fluent maping and advanced methods like "ConvertUsing".