Hello Commons-Devs, *Related JIRA issue*: https://issues.apache.org/jira/browse/CSV-270 Improvement suggested in above Jira issue: To clearly identify the CSV parser related issue from *IOException *issues, introduce a new parser exception.
Current behavior: For all parser issues, code is throwing *IOException*. Notes: I have gone through the requirements discussed in this issue description and have created a git diff on possible locations where we can introduce the new Exception type for CSV parse issues. I can work on this issue if we have possible go ahead for these changes. In the comments, it is mentioned that we should consider using *IllegalStateException* whenever possible instead of introducing a new exception type for CSV parse issues. Therefore, I have looked at the official JavaDoc documentation for *IllegalStateException* it says: *IllegalStateException *-> "Signals that a method has been invoked at an illegal or inappropriate time. In other words, the Java environment or Java application is not in an appropriate state for the requested operation." [Ref: https://docs.oracle.com/javase%2F7%2Fdocs%2Fapi%2F%2F/java/lang/IllegalStateException.html ] By simply looking at the definition of *IllegalStateException*, IMO, it does not seems to be an ideal candidate to notify regarding the CSV parsing issues. Therefore, I think it is best to introduce a new Exception such as 'ParserException' etc. Link to the Git Diff containing comments: https://github.com/apache/commons-csv/compare/master...gbidsilva:commons-csv-osc:CSV-270 Appreciate your feedback on this. Thank you. Buddhi De Silva.