made error handling more robust so analysis should stop when something goes wrong with a signle jar

Former-commit-id: 1e8fb3a5e6e904751c98a3621630f7953400e802
This commit is contained in:
Jeremy Long
2013-12-21 07:46:47 -05:00
parent 64ebc35dbd
commit 076ad8ef7e

View File

@@ -336,6 +336,12 @@ public class Engine {
a.analyze(d, this);
} catch (AnalysisException ex) {
d.addAnalysisException(ex);
} catch (Throwable ex) {
final String axMsg = String.format("An unexpected error occured during analysis of '%s'", d.getActualFilePath());
AnalysisException ax = new AnalysisException(axMsg, ex);
d.addAnalysisException(ax);
Logger.getLogger(Engine.class.getName()).log(Level.SEVERE, axMsg);
Logger.getLogger(Engine.class.getName()).log(Level.FINE, axMsg, ex);
}
}
}