-
Type:
Suggestion
-
Resolution: Won't Fix
-
None
-
Component/s: Editor - Page / Comment Editor
NOTE: This suggestion is for Confluence Server. Using Confluence Cloud? See the corresponding suggestion.
It would be really helpful if you could log content that is causing exceptions for TOC. TOC requires generated HTML is fully XML compliant and this causes endless problems for users and plugin developers. Usually results in com.ctc.wstx.exc.WstxLazyException with no help on what specific text is causing the problem. Once a debug log is added it is usually easy to spot something that isn't quite right. Something as simple as the following should be enough.
private DocumentOutline getOutline(Map<String, String> parameters, DocumentOutline outline, final String xhtmlPageContent) throws MacroExecutionException {
try {
outline = staxDocumentOutlineCreator.getOutline(xhtmlPageContent);
} catch (StaxOutlineBuilderException ex) {
throw new MacroExecutionException(getI18nBean().getText("macro.error.pageparsefail"));
} catch (Exception e) {
log.debug("xhtmlPageContent: {}", xhtmlPageContent);
throw new MacroExecutionException(e);
}
return outline;
}
- relates to
-
CONFCLOUD-31316 Log debug information to help resolve com.ctc.wstx.exc.WstxLazyException
- Closed
- clones
-
TOC-156 Loading...