From 37fef0749c758952a64119876c54a5e7ffaac66d Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Wed, 26 May 2021 10:01:02 -0400 Subject: [PATCH] Bug 573786: Handle UnsatisfiedLinkError turn off ConPTY When starting on older versions of Windows ensure that WinPTY continues to be used by catching all the types of exceptions that may indicate that ConPTY is not available. This change catches all Throwables as we want to know about all RuntimeExceptions and Errors Change-Id: I7524d9286efe9296f1bb44311c4a3be1e5195c14 --- .../src/org/eclipse/cdt/utils/pty/PTY.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTY.java b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTY.java index cf47a6a1169..235b3f6f547 100644 --- a/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTY.java +++ b/core/org.eclipse.cdt.core.native/src/org/eclipse/cdt/utils/pty/PTY.java @@ -146,12 +146,12 @@ public class PTY { slaveInit = "conpty"; //$NON-NLS-1$ inInit = new ConPTYInputStream(conPTY); outInit = new ConPTYOutputStream(conPTY); - } catch (RuntimeException e) { - isConPTY = IS_CONPTY.CONPTY_NO; - CNativePlugin.log(Messages.PTY_FailedToStartConPTY, e); } catch (NoClassDefFoundError e) { isConPTY = IS_CONPTY.CONPTY_NO; CNativePlugin.log(Messages.PTY_NoClassDefFoundError, e); + } catch (Throwable e) { + isConPTY = IS_CONPTY.CONPTY_NO; + CNativePlugin.log(Messages.PTY_FailedToStartConPTY, e); } }