More throughout logging in PythonSdkUpdater

Add cause to the logged exception so that it's possible to see where
exactly SDK updating process was launched which is impossible at the
moment because of the nested backgroundable task and invokeLater().
This commit is contained in:
Mikhail Golubev
2016-07-07 11:54:45 +03:00
parent 9f9185787e
commit 49367632f5
@@ -133,6 +133,7 @@ public class PythonSdkUpdater implements StartupActivity {
return true;
}
@SuppressWarnings("ThrowableInstanceNeverThrown") final Throwable methodCallStacktrace = new Throwable();
application.invokeLater(() -> {
synchronized (ourLock) {
if (!ourScheduledToRefresh.contains(homePath)) {
@@ -165,6 +166,7 @@ public class PythonSdkUpdater implements StartupActivity {
PyPackageManager.getInstance(sdk12).refreshAndGetPackages(true);
}
catch (ExecutionException e) {
e.initCause(methodCallStacktrace);
LOG.warn(e);
}
}