1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-21 21:52:10 +02:00

Bug 563015: Log exception if process.pid() fails

Change-Id: Ie9888e1e56b19086890caf221f0cbd97eafa817c
This commit is contained in:
Jonah Graham 2021-04-23 11:21:16 -04:00
parent e033c50e28
commit 6386faff0d

View file

@ -306,6 +306,7 @@ public class ProcessConnector extends AbstractStreamsConnector {
*/
@Override
public Optional<String> getWorkingDirectory() {
try {
long pid = process.pid();
try {
if (Platform.getOS().equals(Platform.OS_LINUX)) {
@ -315,6 +316,9 @@ public class ProcessConnector extends AbstractStreamsConnector {
} catch (Exception e) {
UIPlugin.log("Failed to obtain working directory of process id " + pid, e); //$NON-NLS-1$
}
} catch (Exception e) {
UIPlugin.log("Failed to obtain process id of terminal process", e); //$NON-NLS-1$
}
return Optional.empty();
}
}