Skip to content

Commit

Permalink
Swallow parsing errors.
Browse files Browse the repository at this point in the history
Let's see if we can still go through.
  • Loading branch information
khatchad committed Oct 10, 2023
1 parent fb9e73b commit b3c28a8
Showing 1 changed file with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,21 @@
import com.ibm.wala.types.TypeReference;
import com.ibm.wala.util.CancelException;
import com.ibm.wala.util.WalaException;
import com.ibm.wala.util.WalaRuntimeException;
import com.ibm.wala.util.collections.HashMapFactory;
import com.ibm.wala.util.collections.HashSetFactory;
import java.io.IOException;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;

public abstract class PythonAnalysisEngine<T>
extends AbstractAnalysisEngine<InstanceKey, PythonSSAPropagationCallGraphBuilder, T> {

private static final Logger logger = Logger.getLogger(PythonAnalysisEngine.class.getName());

static {
try {
Class<?> j3 = Class.forName("com.ibm.wala.cast.python.loader.Python3LoaderFactory");
Expand Down Expand Up @@ -130,17 +133,23 @@ public void buildAnalysisScope() throws IOException {

@Override
public IClassHierarchy buildClassHierarchy() {
IClassHierarchy cha = null;

try {
IClassHierarchy cha = SeqClassHierarchyFactory.make(scope, loader);
Util.checkForFrontEndErrors(cha);
setClassHierarchy(cha);
return cha;
cha = SeqClassHierarchyFactory.make(scope, loader);
} catch (ClassHierarchyException e) {
assert false : e;
return null;
}

try {
Util.checkForFrontEndErrors(cha);
} catch (WalaException e) {
throw new WalaRuntimeException(e.getMessage(), e);
logger.log(Level.SEVERE, e, () -> "Encountered WALA exception, most likely from front-end parsing errors.");
}

setClassHierarchy(cha);
return cha;
}

protected void addSummaryBypassLogic(AnalysisOptions options, String summary) {
Expand Down

0 comments on commit b3c28a8

Please sign in to comment.