Skip to content

Commit

Permalink
add exception message to response XML
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwechner committed Aug 22, 2012
1 parent 6f76c68 commit fc902a1
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -84,8 +84,13 @@ protected InputStream getContentXML(String viewId) throws Exception {
try {
userInterests = getUserInterests(cookie.getValue(), boost_domain);
} catch(ServiceException e) {
log.error(e, e);
// No interests
log.error(e, e);

Element exceptionEl = doc.createElementNS(NAMESPACE, "exception");
exceptionEl.appendChild(doc.createTextNode(e.getMessage()));
root.appendChild(exceptionEl);

Element errEl = doc.createElementNS(NAMESPACE, "no-profile");
root.appendChild(errEl);
return XMLHelper.getInputStream(doc, false, false, null);
Expand Down

0 comments on commit fc902a1

Please sign in to comment.