garydgregory edited a comment on pull request #181:
URL: https://github.com/apache/commons-io/pull/181#issuecomment-753983815


   Hi @abchaubey 
   Thank you for your PR.
   I think we need to consider taking a look at all of Commons IO and consider 
if this is a task we want to do consistently: When do we throw an IOException 
vs IllegalArgumentException vs IllegalStateException vs 
UnsupportedOperationException and so on. 
   So IOW, let's pause and all think about this instead of doing a one-off PR 
here...
   This case in particular is interesting because the exception is thrown 
because the expected input does not match the actual file, so either the input 
is wrong (IAE) OR something went wrong while reading the file (IOEx). So either 
exception might be valid here. One general rule could be that IOEx all come 
from the JRE... needs further thought...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to