On 28 Jan 2016 at 16:57, Emil Dotchevski wrote:
Let's take socket errors for example, which on POSIX are communicated by the OS through errno, while on Windows there is the GetLastError function. Using the Boost Exception approach, you would always store the errno into any socket exception object, and on Windows you'd also store the GetLastError code. At the catch site, regardless of the platform, you can put in logic that takes correct action based on the presence or absence of any particular error_info:
Doesn't std::system_error already do this for us, and it's already in the standard and it also allows arbitrary domain specific error coding? Niall -- ned Productions Limited Consulting http://www.nedproductions.biz/ http://ie.linkedin.com/in/nialldouglas/