File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -754,14 +754,21 @@ void main_loop_iteration(void* user_data)
754754
755755int main (int argc, const char ** argv)
756756{
757- std::unique_ptr<ruisapp::application> app = ruisapp::application_factory::make_application (argc, argv);
758- if (!app) {
759- // Not an error. The application just did not show any GUI to the user.
760- return 0 ;
761- }
757+ try {
758+ std::unique_ptr<ruisapp::application> app = ruisapp::application_factory::make_application (argc, argv);
759+ if (!app) {
760+ // Not an error. The application just did not show any GUI to the user.
761+ return 0 ;
762+ }
762763
763- while (!get_impl (*app).quit_flag .load ()) {
764- main_loop_iteration (app.get ());
764+ while (!get_impl (*app).quit_flag .load ()) {
765+ main_loop_iteration (app.get ());
766+ }
767+ } catch (std::exception& e) {
768+ #if CFG_OS_NAME == CFG_OS_NAME_EMSCRIPTEN
769+ std::cout << " uncaught " << utki::to_string (e) << std::endl;
770+ #endif
771+ throw ;
765772 }
766773
767774 return 0 ;
You can’t perform that action at this time.
0 commit comments