Commit 66c3f8cc authored by Francesco Chicchiricco's avatar Francesco Chicchiricco
Browse files

Adding more LOG statements

parent cefb25b8
......@@ -425,10 +425,12 @@ public class ChoreographyLogic extends AbstractLogic<AbstractBaseBean> {
chorSpecXML = IOUtils.readBytesFromStream(enactedChorSpec);
chorSpec = Choreography.fromXML(new ByteArrayInputStream(chorSpecXML));
} catch (IOException | JAXBException | XMLStreamException e) {
LOG.error("While reading enacted chorSpec for choreography {}", id, e);
throw new BadRequestException("While reading enacted chorSpec for choreography " + id, e);
}
}
if (chorSpec == null) {
LOG.error("Cloud not parse enacted chorSpec for choreography {}", id);
throw new BadRequestException("Cloud not parse enacted chorSpec for choreography " + id);
}
......@@ -441,12 +443,15 @@ public class ChoreographyLogic extends AbstractLogic<AbstractBaseBean> {
case CREATE:
String enactmentEngineKey = CREATE_REQUESTS.get(id);
if (enactmentEngineKey == null) {
LOG.error("Could not find matching Enactment Engine instance for {}", id);
throw new BadRequestException("Could not find matching Enactment Engine instance for " + id);
} else {
// ensures that enactmentEngine contains effectively the entity key and that
// such object exists and has the expected type
AnyObjectTO enactmentEngine = anyObjectLogic.read(enactmentEngineKey);
if (!ENACTMENT_ENGINE_TYPE.equals(enactmentEngine.getType())) {
LOG.error("Could not find Enactment Engine with key {}",
enactmentEngine.getKey());
throw new BadRequestException("Could not find Enactment Engine with key "
+ enactmentEngine.getKey());
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment