如果我抛出异常:
throw Cat("Minoo");
然后我在调用堆栈的某个较低级别捕获并重新抛出...:
catch(...)
{
throw;
}
然后在调用堆栈中的其他较低级别我 try catch :
catch(const Cat& c)
{
//Will it enter here, and if so will c be valid data?
}
catch(...)
{
}
最佳答案
是的,这是正确的。这在 the very next question 中得到解决。我在您之前的问题中链接到的 C++ 常见问题解答部分。
关于c++ - 从捕获中重新抛出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1041167/