Boost logo

Boost :

Subject: Re: [boost] [system][filesystem v3] Question abouterror_code arguments
From: Detlef Vollmann (dv_at_[hidden])
Date: 2009-10-27 20:04:10

Andrey Semashev wrote:
> I wouldn't say that it would narrow the language in some way. You still
> get the same functionality, only error reporting mechanism is in
> question. Using exceptions for this purpose is, well... following the
> language spirit, so to say, while mandating a dual approach honors code
> diversity. I happened to support some code that used both exceptions and
> error codes for error reporting, and I must say it was a pain. I think,
> at least for educational purposes one form of functions (the throwing
> one) should be highlighted as preferred.
Maybe I missed something, but the subject still says 'filesystem'.
And especially in that domain it's often that an error is not
exceptional, e.g. 'file not found' or 'EAGAIN'.
And errors that aren't exceptional shouldn't be reported and
handled by exception throwing (and catching).
What is exceptional and what not depends on the actual application,
hence the two different forms.


Boost list run by bdawes at, gregod at, cpdaniel at, john at