Boost logo

Boost Users :

Subject: [Boost-users] [boost.test] How to register custom exception for auto test?
From: Jörg Becker (news_at_[hidden])
Date: 2013-12-19 06:39:34

On Thursday 08 November 2012 22:19:09 Gennadiy Rozental wrote:
> Jörg Becker <news <at>> writes:
> > I expect to see: Caught my_exception1
> This is what I observe with trunk build.
> > I get:
> > Running 1 test case...
> > unknown location(0): fatal error in "excption1_test": unknown type
> >
> > Environment:
> > boost 1.49.0
> > gcc 4.6.3
> > Fedora 15
> > linked boost test library
> Weird. Should have worked.
> Gennadiy

Hello again!

I just gave boost 1.55.0 with gcc 4.7.2 a try. But the old test in my initial
mail still results in unknown location(0): fatal error in "excption1_test":
unknown type.

Since I was sure I saw the custom exception handling working one day, I tried
the header only version by including
#include <boost/test/included/unit_test.hpp>.
And this time I saw the expected result: Caught my_exception1!!!

Unfortunately I have to use the dynamic library test variant. So can anybody
tell me how to enable the custom exception handling for the dynamic test
library? What is the difference to the header-only variant (concerning the
exception handling).

Thanks for any hints

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at