import org.onap.ccsdk.sli.core.sli.SvcLogicException;
import org.onap.ccsdk.sli.core.sli.SvcLogicJavaPlugin;
import org.onap.sdnc.config.generator.ConfigGeneratorConstant;
+import org.onap.sdnc.config.generator.merge.ParameterMissingException;
import org.onap.sdnc.config.generator.tool.CheckDataTool;
import org.onap.sdnc.config.generator.tool.LogParserTool;
responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix + ".") : "";
String logData = inParams.get(ConfigGeneratorConstant.INPUT_PARAM_LOG_DATA);
if (StringUtils.isBlank(logData)) {
- throw new Exception("Log Data is missing");
+ throw new ParameterMissingException("Log Data is missing");
}
LogParserTool logParserTool = new LogParserTool();
String parsedError = logParserTool.parseErrorLog(logData);
ConfigGeneratorConstant.OUTPUT_STATUS_FAILURE);
ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_ERROR_MESSAGE,
e.getMessage());
- log.error("Failed in parsing error log " + e.getMessage());
+ log.error("Failed in parsing error log", e);
throw new SvcLogicException(e.getMessage());
}
}
responsePrefix = StringUtils.isNotBlank(responsePrefix) ? (responsePrefix + ".") : "";
String checkData = inParams.get(ConfigGeneratorConstant.INPUT_PARAM_CHECK_DATA);
if (StringUtils.isBlank(checkData)) {
- throw new Exception("Check Data is missing");
+ throw new ParameterMissingException("Check Data is missing");
}
String dataType = CheckDataTool.checkData(checkData);
ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_DATA_TYPE,
ConfigGeneratorConstant.OUTPUT_STATUS_FAILURE);
ctx.setAttribute(responsePrefix + ConfigGeneratorConstant.OUTPUT_PARAM_ERROR_MESSAGE,
e.getMessage());
- log.error("Failed in checkDataType " + e.getMessage());
+ log.error("Failed in checkDataType", e);
throw new SvcLogicException(e.getMessage());
}
}
-
}