Boost logo

Boost Users :

From: Matthias Kaeppler (nospam_at_[hidden])
Date: 2005-02-21 12:16:25


Ben Hutchings wrote:
>> Or, less elegantly, you could always catch the exception in the
>> procedure.
>
>
> Since the filesystem is normally shared with other processes which may
> change it at any time, you should be prepared for file operations to
> fail even if you check in advance that they should work. So checking in
> advance cannot substitute for exception-handling; it's extra programming
> effort and may actually be slower than handling the occasional exception.
>
> Ben.

I do both. However, for the problem I was describing, it's already too
late when the exception is caught, because application flow terminates
for a (IMO) minor reason at a point where I can't go back.
But of course, I still catch filesystem_errors on several occasions.

-- 
Matthias Kaeppler

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net