You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2014/05/06 02:54:15 UTC
[jira] [Commented] (CSV-113) Check whether ISE/IAE are being used
appropriately
[ https://issues.apache.org/jira/browse/CSV-113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990155#comment-13990155 ]
Sebb commented on CSV-113:
--------------------------
CSVFormat.validate() should throw IAE not ISE
CSVParser.initializeHeader() throws ISE. The header probably ought to be validated in the CSVFormat constructor.
Should null parameters throw IAE or NPE?
Needs discussion.
> Check whether ISE/IAE are being used appropriately
> --------------------------------------------------
>
> Key: CSV-113
> URL: https://issues.apache.org/jira/browse/CSV-113
> Project: Commons CSV
> Issue Type: Task
> Reporter: Sebb
>
> The code throws a lot of IllegalStateExceptions (ISE).
> It also throws some IllegalArgumentExceptions (IAE).
> These need reviewing to check that ISE really does apply to the current state, and IAE is used for reporting an incorrect argument.
> Generally if ISE applies, no argument values will be valid.
> IAE should be used when a specific argument or set of arguments is invalid.
--
This message was sent by Atlassian JIRA
(v6.2#6252)