void Fraction::setQ(int q) { throw new std::logic_error("Divider must not be这个代码是用这个代码块来测试的 BOOST_CHECK_THROW( std::logic_error}
但是,当boost应该捕获异常时,它不会,并
在下面的代码中,函数A::doSomething()退出,但有两个logic_error异常。析构函数~A()中的第二个logic_error似乎覆盖了A::doSomething()中的logic_error。程序的输出如下所示。我的问题是A::doSomething()抛出的logic_error发生了什么。有没有办法恢复它?#include <iostream>
using namespace <e