use of com.synopsys.integration.configuration.config.InvalidPropertyException in project synopsys-detect by blackducksoftware.
the class ExceptionUtility method logException.
public void logException(Exception e) {
if (e instanceof OperationException) {
OperationException operationException = (OperationException) e;
logException(operationException.getException());
} else if (e instanceof DetectUserFriendlyException) {
if (e.getCause() != null) {
logger.debug(e.getCause().getMessage(), e.getCause());
}
logger.error(e.getMessage());
} else if (e instanceof BlackDuckTimeoutExceededException) {
logger.error(BLACKDUCK_TIMEOUT_ERROR_MESSAGE);
logger.error(e.getMessage());
} else if (e instanceof BlackDuckApiException) {
BlackDuckApiException be = (BlackDuckApiException) e;
logger.error(BLACKDUCK_ERROR_MESSAGE);
logger.error(be.getMessage());
logger.debug(be.getBlackDuckErrorCode());
logger.error(be.getOriginalIntegrationRestException().getMessage());
} else if (e instanceof IntegrationRestException) {
logger.error(BLACKDUCK_ERROR_MESSAGE);
logger.debug(e.getMessage(), e);
} else if (e instanceof IntegrationException) {
logger.error(BLACKDUCK_ERROR_MESSAGE);
logger.debug(e.getMessage(), e);
} else if (e instanceof InvalidPropertyException) {
logger.error("A configuration error occured");
logger.debug(e.getMessage(), e);
} else {
logUnrecognizedException(e);
}
}
Aggregations