Boost logo

Boost Users :

Subject: Re: [Boost-users] [TEST] Throws "Escaping" both BOOST_CHECK_THROW and try{}
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2016-02-09 01:58:07

On 9/02/2016 13:53, Merrill Cornish wrote:
> I'm running Windows 10, 64-bit; MinGW 64-bit; GCC 5.3 64-bit; and BOOST
> 1_60_1
> terminate called after throwing an instance of 'std::out_of_range'
> what(): vector::_M_range_check: __n (which is 1) >= this->size()
> (which is 1)
> This application has requested the Runtime to terminate it in an unusual
> way.
> Please contact the application's support team for more information.
> SIGABRT intercepted; converted to exit(EXIT_FAILURE).
> arcSize() is implemented with std::vector::at() and the index is
> out-of-range, so it's
> supposed to throw std::out_of_range. That's what was detected, so why
> did it
> terminate the program? (The last line comes from my SIGABRT handler.
> Without it, the test executable ends up locked and can't be deleted.)

Do you have a throw-specification or noexcept on the arcSize() method?
Throwing any exception type not listed in the specification will result
in this sort of behaviour.

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