Capture stacktrace from the original thread when SlaveComputer#_connect fails
@@ -283,6 +283,7 @@ public class SlaveComputer extends Computer {
logger.fine("Forcing a reconnect on "+getName());
closeChannel();
+ Exception threadInfo = new Exception();
return lastConnectActivity = Computer.threadPoolForRemoting.submit(() -> {
// do this on another thread so that the lengthy launch operation
// (which is typical) won't block UI thread.
@@ -295,16 +296,20 @@ public class SlaveComputer extends Computer {
offlineCause = null;
launcher.launch(SlaveComputer.this, taskListener);
} catch (AbortException e) {
+ e.addSuppressed(threadInfo);
taskListener.error(e.getMessage());
throw e;
} catch (IOException e) {
+ e.addSuppressed(threadInfo);
Util.displayIOException(e,taskListener);
Functions.printStackTrace(e, taskListener.error(Messages.ComputerLauncher_unexpectedError()));
throw e;
} catch (InterruptedException e) {
+ e.addSuppressed(threadInfo);
Functions.printStackTrace(e, taskListener.error(Messages.ComputerLauncher_abortedLaunch()));
throw e;
} catch (Exception e) {
+ e.addSuppressed(threadInfo);
Functions.printStackTrace(e, taskListener.error(Messages.ComputerLauncher_unexpectedError()));
throw e;
}
