- int result=app_->main();
- delete app_;
- return result;
-}
-
-/**
-Prints a message describing the usage of the application. The default version
-will blame the programmer for being lazy.
+#ifdef WIN32
+ string msg = Debug::demangle(typeid(e).name())+":\n"+e.what();
+ MessageBoxA(0, msg.c_str(), "Uncaught exception", MB_OK|MB_ICONERROR);
+#else
+ IO::print(IO::cerr, "An uncaught exception occurred.\n");
+ IO::print(IO::cerr, " type: %s\n", Debug::demangle(typeid(e).name()));
+ IO::print(IO::cerr, " what(): %s\n", e.what());
+#endif