* We don't fail on a ModelException, we just stuff it into the
* model response and carry on, so that the client gets the
* exception
*/
ModelResponse res = null;
ModelResponseMessage resMessage = new ModelResponseMessage();
try
{
res = req.execute();
}
catch (ModelException me)
{
resMessage.addError("model", me);
if (getLogger().isDebugEnabled())
{
getLogger().debug("Error from model execution:", me);
}
}
try
{
if (res == null)
{
getLogger().error("Response from model was null");
}
else
{
resMessage.copyFrom(res);
}
}
catch (Exception ce)
{
getLogger().error("Unable to copy response to message:", ce);
resMessage.addError("badCopy", ce);
}
/**
* Stash any changes to the context
*/