Merge branch 'master' of www.klayout.org:/home/matthias/klayout

This commit is contained in:
Matthias Koefferlein 2017-11-01 22:14:33 +01:00
commit 4599d342ef
1 changed files with 22 additions and 12 deletions

View File

@ -216,6 +216,9 @@ LONG WINAPI ExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo)
SymCleanup (process); SymCleanup (process);
bool has_gui = lay::Application::instance () && lay::Application::instance ()->has_gui ();
if (has_gui) {
// YES! I! KNOW! // YES! I! KNOW!
// In a signal handler you shall not do fancy stuff (in particular not // In a signal handler you shall not do fancy stuff (in particular not
// open dialogs) nor shall you throw exceptions! But that scheme appears to // open dialogs) nor shall you throw exceptions! But that scheme appears to
@ -231,6 +234,13 @@ LONG WINAPI ExceptionHandler(PEXCEPTION_POINTERS pExceptionInfo)
} else { } else {
throw tl::CancelException (); throw tl::CancelException ();
} }
} else {
tl::error << text << tl::noendl;
return EXCEPTION_EXECUTE_HANDLER;
}
} }
static void handle_signal (int signo) static void handle_signal (int signo)