
28 Oct
2009
28 Oct
'09
3:39 a.m.
Scott McMurray wrote:
2009/10/27 Andrey Semashev <andrey.semashev@gmail.com>:
Then, perhaps, we should take a closer look at these errors. Does, for instance, failing to delete a file qualify as such non-exception error?
Depends on the usage. If I'm removing a cache file, it's plausible that it doesn't exist, and it's easier (less to type), faster (fewer operations to run), and more correct (due to race conditions) to just delete it than to guard it with an existence check.
As I said in my another post, it depends on how postconditions are formed. If "the file does not exist" is the postcondition, I don't see why it should throw in the case you described.