1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 18:26:01 +02:00

[260991] - applied patch to prevent parsers throwing exception screw everything else

This commit is contained in:
Alena Laskavaia 2009-01-15 16:01:21 +00:00
parent bd8c6c1ffc
commit d52e5c0f1c

View file

@ -216,16 +216,22 @@ public class ErrorParserManager extends OutputStream {
if (lineTrimmed.length() > 1000) if (lineTrimmed.length() > 1000)
continue; continue;
} }
// standard behavior (pre 5.1) is to trim the line
String lineToParse = lineTrimmed;
if ((types & IErrorParser2.KEEP_UNTRIMMED) !=0 ) { if ((types & IErrorParser2.KEEP_UNTRIMMED) !=0 ) {
// untrimmed lines // untrimmed lines
if (curr.processLine(line, this)) { lineToParse = line;
}
// Protect against rough parsers who may accidentally
// throw an exception on a line they can't handle.
// It should not stop parsing of the rest of output.
try {
if (curr.processLine(lineToParse, this)) {
return; return;
} }
continue; } catch (Exception e){
} String message = "Error parsing line [" + lineToParse + "]"; //$NON-NLS-2$
// standard behavior (pre 5.1) CCorePlugin.log(message, e);
if (curr.processLine(lineTrimmed, this)) {
return;
} }
} }
} }