From 49367632f5b8eca09570c47f2e48df2f6e678ebc Mon Sep 17 00:00:00 2001 From: Mikhail Golubev Date: Wed, 6 Jul 2016 14:19:55 +0300 Subject: [PATCH] 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(). --- python/src/com/jetbrains/python/sdk/PythonSdkUpdater.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python/src/com/jetbrains/python/sdk/PythonSdkUpdater.java b/python/src/com/jetbrains/python/sdk/PythonSdkUpdater.java index e593af40baa9..edca9e70620f 100644 --- a/python/src/com/jetbrains/python/sdk/PythonSdkUpdater.java +++ b/python/src/com/jetbrains/python/sdk/PythonSdkUpdater.java @@ -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); } }