RUBY-24761 Added debugging of rake tasks loading

GitOrigin-RevId: a9b4121b8d21cff15153485548e35cd0293742e2
This commit is contained in:
Alexandr Evstigneev
2019-08-27 10:01:23 +03:00
committed by intellij-monorepo-bot
parent 6a97a5d35d
commit 2f35af4529
@@ -54,7 +54,7 @@ import java.util.function.BooleanSupplier;
* @author Roman Chernyatchik
*/
public class ExecutionHelper {
private static final Logger LOG = Logger.getInstance(ExecutionHelper.class.getName());
private static final Logger LOG = Logger.getInstance(ExecutionHelper.class);
private ExecutionHelper() {
}
@@ -76,6 +76,25 @@ public class ExecutionHelper {
if (ApplicationManager.getApplication().isUnitTestMode() && !errors.isEmpty()) {
throw new RuntimeException(errors.get(0));
}
errors.forEach(it -> {
if (LOG.isDebugEnabled()) {
LOG.debug("Got error: ", it);
}
else {
LOG.warn("Got error: " + it.getMessage());
}
});
warnings.forEach(it -> {
if (LOG.isDebugEnabled()) {
LOG.debug("Got warning: ", it);
}
else {
LOG.warn("Got warning: " + it.getMessage());
}
});
ApplicationManager.getApplication().invokeLater(() -> {
if (myProject.isDisposed()) return;
if (errors.isEmpty() && warnings.isEmpty()) {