Search in sources :

Example 1 with OwaspZapWrapperCommandLineParserException

use of com.mercedesbenz.sechub.owaspzapwrapper.cli.OwaspZapWrapperCommandLineParser.OwaspZapWrapperCommandLineParserException in project sechub by mercedes-benz.

the class OwaspZapWrapperCLI method resolveScanConfiguration.

private OwaspZapScanConfiguration resolveScanConfiguration(String[] args) {
    OwaspZapWrapperCommandLineParser parser = new OwaspZapWrapperCommandLineParser();
    OwaspZapScanConfiguration scanConfig = null;
    try {
        scanConfig = parser.parse(args);
    } catch (OwaspZapWrapperCommandLineParserException e) {
        LOG.error("An error occurred while parsing the command line arguments: ", e.getCause());
        throw new MustExitRuntimeException("Scan configuration was invalid.", e, MustExitCode.COMMANDLINE_CONFIGURATION_INVALID);
    }
    return scanConfig;
}
Also used : OwaspZapScanConfiguration(com.mercedesbenz.sechub.owaspzapwrapper.config.OwaspZapScanConfiguration) OwaspZapWrapperCommandLineParserException(com.mercedesbenz.sechub.owaspzapwrapper.cli.OwaspZapWrapperCommandLineParser.OwaspZapWrapperCommandLineParserException)

Aggregations

OwaspZapWrapperCommandLineParserException (com.mercedesbenz.sechub.owaspzapwrapper.cli.OwaspZapWrapperCommandLineParser.OwaspZapWrapperCommandLineParserException)1 OwaspZapScanConfiguration (com.mercedesbenz.sechub.owaspzapwrapper.config.OwaspZapScanConfiguration)1