Boost logo

Boost Users :

Subject: Re: [Boost-users] [test] Unexpected Exceptions
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2010-01-03 19:56:37


Florian Winter wrote:
> Before I provide more information, I would like to know what Boost.Test
> is _expected_ to do in the case of unexpected exceptions, so I know if
> I'm actually seeing a bug or expected behavior. In my test cases, I see
> output similar to the following when an unexpected exception is thrown:

In current state Boost.Test does not try to handle unexpected
exceptions, but in my experiments I was not able to do anything
meaningful inside the framework to help handle this error.

>
> and the process exits with a result value of 0. This looks like
> Boost.Test is "catching" the error (probably using set_unexpected),
> because otherwise, the process would not exit with a result value of 0.
>> It seems that MSVC for example does not follow standard here:
>> http://msdn.microsoft.com/en-us/library/7twc8dwy(VS.80).aspx
>>
> How? What is the problem with MSVC and set_unexpected, and what are the
> consequences for the behavior of Boost.Test?

 From that page:
  The C++ Standard requires that unexpected is called when a function
  throws an exception that is not on its throw list. The current
  implementation does not support this.

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