|
2
发表于 2012-6-15 13:54:59
|只看该作者
本帖最后由 jinchengde 于 2012-6-15 13:56 编辑
代码中有这么一段:
// FIXME: add other, more specific
// exceptions.
try {
std::set_terminate(fg_terminate);
atexit(fgExitCleanup);
if (fgviewer)
fgviewerMain(argc, argv);
else
fgMainInit(argc, argv);
} catch (const sg_throwable &t) {
// We must use cerr rather than
// logging, since logging may be
// disabled.
cerr << "Fatal error: " << t.getFormattedMessage() << endl;
if (std::strlen(t.getOrigin()) != 0)
cerr << " (received from " << t.getOrigin() << ')' << endl;
} catch (const string &s) {
cerr << "Fatal error: " << s << endl;
} catch (const char *s) {
cerr << "Fatal error: " << s << endl;
} catch (...) {
cerr << "Unknown exception in the main loop. Aborting..." << endl;
if (errno)
perror("Possible cause");
}
跟一下代码看看什么地方抛出来的异常? |
|