Boost logo

Boost :

Subject: Re: [boost] [system][filesystem v3] Question abouterror_code arguments
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-10-27 23:39:23


Scott McMurray wrote:
> 2009/10/27 Andrey Semashev <andrey.semashev_at_[hidden]>:
>> 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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk