elharo commented on PR #586: URL: https://github.com/apache/commons-io/pull/586#issuecomment-2119203043
When the problem is detected a core difference between runtime and checked exceptions. Runtime exceptions indicate program bugs, like passing the wrong argument. Checked exceptions indicate environmental problems that are not known at compile time. A file that does not exist is not an illegal or inappropriate argument. It's not the argument that's wrong. It's the file system. Consider this. The file could exist when the argument is passed and then be deleted by a different process before the method tries to write or read it. The argument was 100% correct but there's still an exception. That shouldn't be an IllegalArgumentException. The argument wasn't the problem he I/O was. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
