Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2005-03-31 20:51:14


"Peter Dimov" <pdimov_at_[hidden]> writes:

> Beman Dawes wrote:
>
>> At 01:06 PM 3/31/2005, Rob Stewart wrote:
>
>>> I disagree. All the caller wants to know is whether the supplied
>>> pathname refers to an existing file.
>>
>> But if it isn't possible to reliably answer that query, shouldn't it
>> be an error?
>
> The answer to this question is probably "no", if by error you mean
> exception, and here is why.
>
> Every exception-throwing function has spawned a predicate that is used to
> avoid the exception (because exceptions cancel the currently active
> operation and this is undesirable in some cases).

Separate predicates don't really help you avoid exceptions reliably in
filesystems because of race conditions. But y'all know that. Why
have we gone down that road, as opposed to having an argument that can
be used to say "don't throw?"

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

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