Boost logo

Boost Users :

Subject: Re: [Boost-users] [Test] Making use of boost::exception_diagnostic_information and friends
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2009-08-09 16:27:06


Emil Dotchevski <emildotchevski <at> gmail.com> writes:

> I'm not familiar with the test runner, but assuming that it is
> written in C++, all it needs is something like:
>
> #include <boost/exception/diagnostic_information.hpp>
> ....
>
> catch(...)
> {
> std::cerr << boost::current_exception_diagnostic_information();
> }
>
> This will print the what() message (if available) too.

I want to have a bit more flexibility as to what and how I print.
I'll need to get a hold of each component separately.

Also I want to catch boost::exception by specific clause. It should
be fine, right? Will I need to place it first in my list of catch
clauses? Cause AFAIK actual type will inherit both boost::exception
and the exception type being thrown.

Gennadiy


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