mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-26 02:51:27 +01:00
Rather than using instanceOf, just add a specific catch for AnalysisException.
This commit is contained in:
@@ -235,16 +235,14 @@ public class AssemblyAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
this.setEnabled(false);
|
this.setEnabled(false);
|
||||||
throw new AnalysisException("Could not execute .NET AssemblyAnalyzer");
|
throw new AnalysisException("Could not execute .NET AssemblyAnalyzer");
|
||||||
}
|
}
|
||||||
|
} catch (AnalysisException e) {
|
||||||
|
throw e;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
if (e instanceof AnalysisException) {
|
LOGGER.warn("An error occurred with the .NET AssemblyAnalyzer;\n"
|
||||||
throw (AnalysisException) e;
|
+ "this can be ignored unless you are scanning .NET DLLs. Please see the log for more details.");
|
||||||
} else {
|
LOGGER.debug("Could not execute GrokAssembly {}", e.getMessage());
|
||||||
LOGGER.warn("An error occurred with the .NET AssemblyAnalyzer;\n"
|
this.setEnabled(false);
|
||||||
+ "this can be ignored unless you are scanning .NET DLLs. Please see the log for more details.");
|
throw new AnalysisException("An error occurred with the .NET AssemblyAnalyzer", e);
|
||||||
LOGGER.debug("Could not execute GrokAssembly {}", e.getMessage());
|
|
||||||
this.setEnabled(false);
|
|
||||||
throw new AnalysisException("An error occurred with the .NET AssemblyAnalyzer", e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
|
builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user