diff --git a/config/alfresco/templates/webscripts/status.ftl b/config/alfresco/templates/webscripts/status.ftl index 120d7b4ab7..7fa345363d 100644 --- a/config/alfresco/templates/webscripts/status.ftl +++ b/config/alfresco/templates/webscripts/status.ftl @@ -21,13 +21,26 @@ ${status.code} Description: ${status.codeDescription}   Message:${status.message!"<Not specified>"} - Exception:<#if status.exception?exists>${status.exception.class.name}<#if status.exception.message?exists> - ${status.exception.message} <#if status.exception?exists> -   - <#list status.exception.stackTrace as element> - ${element} - +   + <@recursestack status.exception/> + +<#macro recursestack exception> + <#if exception.cause?exists> + <@recursestack exception=exception.cause/> + + Exception:${exception.class.name}<#if exception.message?exists> - ${exception.message} +   + <#if exception.cause?exists == false> + <#list exception.stackTrace as element> + ${element} + + <#else> + ${exception.stackTrace[0]} + +   + diff --git a/config/alfresco/templates/webscripts/xml.status.ftl b/config/alfresco/templates/webscripts/xml.status.ftl index a46bd2d735..d7328eeddc 100644 --- a/config/alfresco/templates/webscripts/xml.status.ftl +++ b/config/alfresco/templates/webscripts/xml.status.ftl @@ -9,9 +9,23 @@ <#if status.exception?exists>${status.exception.class.name}<#if status.exception.message?exists> - ${status.exception.message} <#if status.exception?exists> - <#list status.exception.stackTrace as element> - ${element} - + <@recursestack status.exception/> - \ No newline at end of file + + +<#macro recursestack exception> + <#if exception.cause?exists> + <@recursestack exception=exception.cause/> + + <#if exception.cause?exists == false> + ${exception} + <#list exception.stackTrace as element> + ${element} + + <#else> + ${exception} + ${exception.stackTrace[0]} + +   +