mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
[260991] - applied patch to prevent parsers throwing exception screw everything else
This commit is contained in:
parent
bd8c6c1ffc
commit
d52e5c0f1c
1 changed files with 12 additions and 6 deletions
|
@ -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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue