void (@NotNull Runnable run) { try { run.run(); } catch (ProcessCanceledException e) { throw e; } catch (CancellationException e) { throw new CeProcessCanceledException(e); } catch (Throwable e) { Application application = ApplicationManager.getApplication(); if (application != null && application.isUnitTestMode()) { throw e; } try { LOG.error(e); } catch (Throwable e2) { //noinspection CallToPrintStackTrace e2.printStackTrace(); } } }