Рассмотрим этот пример. :
Код: Выделить всё
#include
#include
using namespace std;
int main()
{
struct B {
B(int ii): i(ii) { }
virtual ~B() { }
int i;
};
try {
try {
throw B(1);
}
catch (const B &b) {
std::throw_with_nested(B(2));
}
}
catch (const B &b) {
cout
Подробнее здесь: [url]https://stackoverflow.com/questions/79329585/stdrethrow-exception-with-stdcurrent-exception[/url]
Мобильная версия