made a broad catch even broader

Former-commit-id: 419f42bfbdab2328b6d6eb32baaa6b409ce20b82
This commit is contained in:
Jeremy Long
2014-03-01 06:40:29 -05:00
parent e0be6c746c
commit 1f9996fe62

View File

@@ -180,14 +180,14 @@ public class AssemblyAnalyzer extends AbstractAnalyzer {
if (fos != null) { if (fos != null) {
try { try {
fos.close(); fos.close();
} catch (Exception e) { } catch (Throwable e) {
LOG.fine("Error closing output stream"); LOG.fine("Error closing output stream");
} }
} }
if (is != null) { if (is != null) {
try { try {
is.close(); is.close();
} catch (Exception e) { } catch (Throwable e) {
LOG.fine("Error closing input stream"); LOG.fine("Error closing input stream");
} }
} }
@@ -201,14 +201,16 @@ public class AssemblyAnalyzer extends AbstractAnalyzer {
final XPath xpath = XPathFactory.newInstance().newXPath(); final XPath xpath = XPathFactory.newInstance().newXPath();
final String error = xpath.evaluate("/assembly/error", doc); final String error = xpath.evaluate("/assembly/error", doc);
if (p.exitValue() != 1 || error == null || "".equals(error)) { if (p.exitValue() != 1 || error == null || "".equals(error)) {
LOG.warning("An error occured with the .NET AssemblyAnalyzer, please see the log for more details."); LOG.warning("An error occured with the .NET AssemblyAnalyzer; "
+ "this can be ignored unless you are scanning .NET dlls. Please see the log for more details.");
LOG.fine("GrokAssembly.exe is not working properly"); LOG.fine("GrokAssembly.exe is not working properly");
grokAssemblyExe = null; grokAssemblyExe = null;
throw new AnalysisException("Could not execute .NET AssemblyAnalyzer"); throw new AnalysisException("Could not execute .NET AssemblyAnalyzer");
} }
} catch (Exception e) { } catch (Throwable e) {
LOG.warning("An error occured with the .NET AssemblyAnalyzer, please see the log for more details."); LOG.warning("An error occured with the .NET AssemblyAnalyzer; "
LOG.fine("Could not execute GrokAssembly " + e.getMessage()); + "this can be ignored unless you are scanning .NET dlls. Please see the log for more details.");
LOG.log(Level.FINE, "Could not execute GrokAssembly {0}", e.getMessage());
throw new AnalysisException("An error occured with the .NET AssemblyAnalyzer", e); throw new AnalysisException("An error occured with the .NET AssemblyAnalyzer", e);
} }