|
58 | 58 | import com.ibm.wala.types.TypeReference; |
59 | 59 | import com.ibm.wala.util.CancelException; |
60 | 60 | import com.ibm.wala.util.WalaException; |
61 | | -import com.ibm.wala.util.WalaRuntimeException; |
62 | 61 | import com.ibm.wala.util.collections.HashMapFactory; |
63 | 62 | import com.ibm.wala.util.collections.HashSetFactory; |
64 | 63 | import java.io.IOException; |
65 | 64 | import java.util.Collection; |
66 | 65 | import java.util.Collections; |
67 | 66 | import java.util.Map; |
68 | 67 | import java.util.Set; |
| 68 | +import java.util.logging.Level; |
69 | 69 | import java.util.logging.Logger; |
70 | 70 |
|
71 | 71 | public abstract class PythonAnalysisEngine<T> |
@@ -135,17 +135,26 @@ public void buildAnalysisScope() throws IOException { |
135 | 135 |
|
136 | 136 | @Override |
137 | 137 | public IClassHierarchy buildClassHierarchy() { |
| 138 | + IClassHierarchy cha = null; |
| 139 | + |
138 | 140 | try { |
139 | | - IClassHierarchy cha = SeqClassHierarchyFactory.make(scope, loader); |
140 | | - Util.checkForFrontEndErrors(cha); |
141 | | - setClassHierarchy(cha); |
142 | | - return cha; |
| 141 | + cha = SeqClassHierarchyFactory.make(scope, loader); |
143 | 142 | } catch (ClassHierarchyException e) { |
144 | 143 | assert false : e; |
145 | 144 | return null; |
| 145 | + } |
| 146 | + |
| 147 | + try { |
| 148 | + Util.checkForFrontEndErrors(cha); |
146 | 149 | } catch (WalaException e) { |
147 | | - throw new WalaRuntimeException(e.getMessage(), e); |
| 150 | + logger.log( |
| 151 | + Level.WARNING, |
| 152 | + e, |
| 153 | + () -> "Encountered WALA exception, most likely from front-end parsing errors."); |
148 | 154 | } |
| 155 | + |
| 156 | + setClassHierarchy(cha); |
| 157 | + return cha; |
149 | 158 | } |
150 | 159 |
|
151 | 160 | protected void addSummaryBypassLogic(AnalysisOptions options, String summary) { |
|
0 commit comments