[exception, system] using boost::system::error_code with boost::exception

Hi boost users, I'm a very happy user of both error_code and exception, but now I found a new use case which is to combine them. So I'm looking for an example of how to add an error_code into an exception and get it all nicely formatted with diagnostic_information. I can see how to use error_info [1] but not error_code. Any pointers would be appreciated. Cheers Marco -- So young, and already so unknown -- Pauli blog: http://mcraveiro.blogspot.com [1] http://www.boost.org/doc/libs/1_52_0/libs/exception/doc/tutorial_transportin...

On Mon, Dec 10, 2012 at 3:37 AM, Marco Craveiro
Hi boost users,
I'm a very happy user of both error_code and exception, but now I found a new use case which is to combine them. So I'm looking for an example of how to add an error_code into an exception and get it all nicely formatted with diagnostic_information. I can see how to use error_info [1] but not error_code. Any pointers would be appreciated.
#include
participants (2)
-
Emil Dotchevski
-
Marco Craveiro