English 中文(简体)
在我使用背特雷斯时,我呼吁澳门
原标题:Where do I use BackTrace calls on the Mac
  • 时间:2009-10-05 14:33:09
  •  标签:

我想从我坠毁的C++中接过一个后盾。 不过,我对澳门特有新申请,但我不敢肯定会怎样才能做到这一点。

我发现了一个有关中继流的问题,它详细介绍了其使用情况:,现存的中继标记可追溯到mac os x

然而,我的问题是,我看不出该法典究竟是怎样生活?

  1. Does it go in the main.cpp?
  2. Does it live in the catch part of a try catch block?

我可以谈一些完整的法典例子,但很难找到这些例子。

最佳回答

另一问题中提及的法典需要在坠毁后执行。 如果一个例外被推翻,或者在信号手里,如果方案由于例如 fault错或公共汽车错误而坠毁,则会发生什么情况。

这里是收集信号的一个例子。 它将在主线上。

static void CatchSignal(int num) {
// code to execute when signal is caught
}

void InstallSignalHandler(const int which[15]) {
     for (int i = 1; i < 15; i++) 
         if (which[i] != 0 && which[i] != SIGABRT)
            signal(which[i],CatchSignal);
}
问题回答

暂无回答




相关问题
热门标签