Boost logo

Boost :

From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-09-23 14:16:36


At 04:49 AM 9/23/2002, Mickael Pointier wrote:

>> To be concrete, suppose I call 'rename' and it throws. There are at
>> least to reasons of failure: (1) source file does not exist and (2)
>> source and destination are on different drives/filesystems. In the
>> second case I'd want to call 'copy', followed by 'remove'. However, how
>> can I detect that the second case caused the error?
>
>This kind of thing is supposed to be handled by the library user ?
>
>I was thinking that the fact of using a real "rename" feature of the
>underlying operating system, or to use a "copy+remove" functionality was
of
>the domain of implementation and should not be exposed to the library
user.
>
>Am I wrong ?

Some apps will want to handle errors at that level of detail even if most
don't.

If fine-grained exceptions are derived from filesystem_error, then the user
is free to catch either the fine-grained or course-grained exceptions
according to the needs of the app.

--Beman


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