}
#endif
+static void terminate() {
+ cerr << endl <<
+ "Uncaught Exception: you should see a meaningful error message\n"
+ "here, but your GLUT (or SDL) library was apparently compiled\n"
+ "and/or linked without exception support. Please complain to\n"
+ "its provider!"
+ << endl << endl;
+ abort();
+}
+
int _bootstrap_OSInit;
// Main entry point; catch any exceptions that have made it this far.
// FIXME: add other, more specific
// exceptions.
try {
+ std::set_terminate(terminate);
atexit(fgExitCleanup);
fgMainInit(argc, argv);
} catch (const sg_throwable &t) {
} 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)