【发布时间】:2011-02-03 11:04:48
【问题描述】:
说我有:
try
{
externalLibrary::doSomething();
}
catch (std::exception &e)
{
//yay I know what to do
}
catch (...)
{
//darn, I've no idea what happened!
}
在某些情况下,您可能会遇到异常并且您不知道它来自哪里或为什么 - 在一些没有调试信息的外部库中。有没有办法找到抛出的东西,或者以其他方式获取与之相关的任何数据?他们可能在做:
throw myStupidCustomString("here is some really useful information");
但我永远不知道我是否抓住了...
如果重要的话,在 MSVC++ 2008 中工作。
【问题讨论】:
标签: c++ visual-studio-2008 exception-handling