From d1dd0b13dba5761c2996062ae48e4e14a3dd2ba7 Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Mon, 7 Aug 2006 18:16:05 +0000 Subject: [PATCH] Set a useful name for SshShellOutputReader --- .../rse/services/ssh/shell/SshShellOutputReader.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellOutputReader.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellOutputReader.java index b882f7ce293..70ad3fd5770 100644 --- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellOutputReader.java +++ b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/services/ssh/shell/SshShellOutputReader.java @@ -20,9 +20,13 @@ package org.eclipse.rse.services.ssh.shell; import java.io.BufferedReader; import java.io.IOException; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; + import org.eclipse.rse.services.shells.AbstractHostShellOutputReader; import org.eclipse.rse.services.shells.IHostShell; import org.eclipse.rse.services.shells.IHostShellOutputReader; +import org.eclipse.rse.services.ssh.Activator; /** * Listener to shell output. As io streams through, refresh events are sent out @@ -37,6 +41,7 @@ public class SshShellOutputReader extends AbstractHostShellOutputReader public SshShellOutputReader(IHostShell hostShell, BufferedReader reader, boolean isErrorReader) { super(hostShell, isErrorReader); + setName("SshShellOutputReader-"+getName()); //$NON-NLS-1$ fReader = reader; } @@ -123,6 +128,10 @@ public class SshShellOutputReader extends AbstractHostShellOutputReader } } } catch (IOException e) { + //FIXME it's dangerous to return null here since this will end + //our reader thread completely... the exception could just be + //temporary, and we should keep running! + Activator.getDefault().getLog().log(new Status(IStatus.WARNING, Activator.getDefault().getBundle().getSymbolicName(), 0, "IOException in SshShellOutputReader", e)); return null; } }