- 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
+ cerr<<"An uncaught exception occurred.\n";
+ cerr<<" type: "<<Debug::demangle(typeid(e).name())<<'\n';
+ cerr<<" what(): "<<e.what()<<'\n';
+#endif