Boost logo

Boost Users :

Subject: Re: [Boost-users] [exception] Conditional error_info addition
From: Emil Dotchevski (emildotchevski_at_[hidden])
Date: 2010-02-16 13:00:24


On Tue, Feb 16, 2010 at 1:54 AM, Adam Badura <abadura_at_[hidden]> wrote:
>> Is this situation a bug? If that's the case I'd do something like:
>
>   No. Its not.
>
>> Like that?
>
>   Yes. This would do. Will anything like this make it into Boost or you
> don't think it is useful enough?

It's a possibility, but I'm not sure I understand the use case well
enough. In the use case you're describing, I would simply make getPath
throw if it can't produce a valid string for whatever reason.

I do use optional error info in exceptions but not like this. Example
would be boost::errinfo_file_name, which may not be present in all
read_error exceptions because some read errors do not involve files.

Emil Dotchevski
Reverge Studios, Inc.
http://www.revergestudios.com/reblog/index.php?n=ReCode


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