Boost logo

Boost Users :

Subject: Re: [Boost-users] [boost][exception] Wide-character design considerations
From: Christoph Heindl (christoph.heindl_at_[hidden])
Date: 2010-06-24 01:40:49


On Thu, Jun 24, 2010 at 12:43 AM, Emil Dotchevski
<emil_at_[hidden]> wrote:
> The Boost Exception framework itself doesn't set a limitation on what
> you can stuff in exceptions. You can use something like:
>
> typedef boost::error_info<struct wfile_name_,std::wstring> wfile_name;
>
> and then you can stuff it in and recover it from exceptions just fine.
> The only issue is how boost::diagnostic_information (which returns a
> std::string) will display a wfile_name, and I'm sure whatever it does
> now isn't correct.
>
> So this isn't a trivial problem. Perhaps the correct thing to do is
> document that boost::diagnostic_information returns a UTF-8 string, I
> kind of prefer this to the other possibility, to add a
> boost::wdiagnostic_information.

What about:
 - having boost::diagnostic_informationreturn a UTF-8 encoded string
for all error_info containing a std::wstring
 - adding a boost::wdiagnostic_information

?

Christoph


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