From c196c08ada72e49106563d03ac6d7022780e83b1 Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Sat, 22 Feb 2014 17:43:12 -0500 Subject: [PATCH] updated error messages Former-commit-id: 88fdd713faf6c53e65540574c9d6140d57f3a7f9 --- .../dependencycheck/analyzer/AssemblyAnalyzer.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/AssemblyAnalyzer.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/AssemblyAnalyzer.java index 626cb49e6..de4fea93c 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/AssemblyAnalyzer.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/AssemblyAnalyzer.java @@ -17,7 +17,6 @@ */ package org.owasp.dependencycheck.analyzer; -import org.owasp.dependencycheck.analyzer.exception.AnalysisException; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; @@ -33,6 +32,7 @@ import javax.xml.xpath.XPath; import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathFactory; import org.owasp.dependencycheck.Engine; +import org.owasp.dependencycheck.analyzer.exception.AnalysisException; import org.owasp.dependencycheck.dependency.Confidence; import org.owasp.dependencycheck.dependency.Dependency; import org.owasp.dependencycheck.dependency.Evidence; @@ -201,13 +201,15 @@ public class AssemblyAnalyzer extends AbstractAnalyzer { final XPath xpath = XPathFactory.newInstance().newXPath(); final String error = xpath.evaluate("/assembly/error", doc); if (p.exitValue() != 1 || error == null || "".equals(error)) { - LOG.warning("GrokAssembly.exe is not working properly"); + LOG.warning("An error occured with the .NET AssemblyAnalyzer, please see the log for more details."); + LOG.fine("GrokAssembly.exe is not working properly"); grokAssemblyExe = null; - throw new AnalysisException("Could not execute GrokAssembly"); + throw new AnalysisException("Could not execute .NET AssemblyAnalyzer"); } } catch (Exception e) { - LOG.warning("Could not execute GrokAssembly " + e.getMessage()); - throw new AnalysisException("Could not execute GrokAssembly", e); + LOG.warning("An error occured with the .NET AssemblyAnalyzer, please see the log for more details."); + LOG.fine("Could not execute GrokAssembly " + e.getMessage()); + throw new AnalysisException("An error occured with the .NET AssemblyAnalyzer", e); } builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();