1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00

readLine() does not throw exception at the end of the stream.

This commit is contained in:
Alain Magloire 2002-08-21 15:28:47 +00:00
parent 1a8b6c2253
commit d5fbd8f312

View file

@ -65,16 +65,17 @@ public class RxThread extends Thread {
BufferedReader reader = BufferedReader reader =
new BufferedReader(new InputStreamReader(session.getChannelInputStream())); new BufferedReader(new InputStreamReader(session.getChannelInputStream()));
try { try {
while (true) {
String line; String line;
while ((line = reader.readLine()) != null) { while ((line = reader.readLine()) != null) {
MIPlugin.getDefault().debugLog(line); MIPlugin.getDefault().debugLog(line);
processMIOutput(line + "\n"); processMIOutput(line + "\n");
} }
}
} catch (IOException e) { } catch (IOException e) {
fireEvent(new MIExitEvent());
//e.printStackTrace(); //e.printStackTrace();
} finally {
session.getMIInferior().setTerminated();
session.terminate();
fireEvent(new MIExitEvent());
} }
} }