void (@NotNull ProgressIndicator indicator) { try { ApplicationManager.getApplication().assertIsNonDispatchThread(); assertSame(indicator, myIndicator); while (System.currentTimeMillis() < end) { ProgressManager.checkCanceled(); } } catch (ProcessCanceledException e) { exception = e; checkCanceledCalled = true; throw e; } catch (RuntimeException | Error e) { exception = e; throw e; } }