1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Improved handling of unexpected exceptions in the indexer, related to bug 221796.

This commit is contained in:
Markus Schorn 2008-03-12 13:40:34 +00:00
parent 0545a83691
commit fe1f5608eb
2 changed files with 11 additions and 9 deletions

View file

@ -626,12 +626,17 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
}
IIndexFileLocation[] ifls= orderedIFLs.toArray(new IIndexFileLocation[orderedIFLs.size()]);
addSymbols(ast, ifls, fIndex, 1, false, configHash, fTodoTaskUpdater, pm);
for (IIndexFileLocation ifl : ifls) {
info= getFileInfo(linkageID, ifl);
assert info != null;
if (info != null) {
info.fIsUpdated= true;
try {
addSymbols(ast, ifls, fIndex, 1, false, configHash, fTodoTaskUpdater, pm);
}
finally {
// mark as updated in any case, to avoid parsing files that caused an exception to be thrown.
for (IIndexFileLocation ifl : ifls) {
info= getFileInfo(linkageID, ifl);
assert info != null;
if (info != null) {
info.fIsUpdated= true;
}
}
}
}

View file

@ -8,7 +8,6 @@
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.pdom;
import java.util.ArrayList;
@ -199,11 +198,9 @@ abstract public class PDOMWriter {
} catch (RuntimeException e) {
stati.add(CCorePlugin.createStatus(
NLS.bind(Messages.PDOMWriter_errorWhileParsing, ifl.getURI().getPath()), e));
break;
} catch (PDOMNotImplementedError e) {
stati.add(CCorePlugin.createStatus(
NLS.bind(Messages.PDOMWriter_errorWhileParsing, ifl.getURI().getPath()), e));
break;
}
if (i<ifls.length-1) {
updateFileCount(0, 0, 1); // update header count