Skip to content

Improve error handling in BrEditor #1

@pierre-sion

Description

@pierre-sion

Hello Michael,

To help debug processing errors, I would suggest the following enhancement to the class org.dbdoclet.trafo.internal.html.docbook.editor.BrEditor (line 58):

DocBookElement parent;
try {
    parent = (DocBookElement) getCurrent().getParentNode();
} catch (ClassCastException ex) {
    logger.error("Failed processing node, current node text content is: " + 
        getCurrent().getTextContent());
    throw ex;
}

if (parent != null) {
    Para para = dbfactory.createPara();
    parent.appendChild(para);
    setParent(para);
    setCurrent(para);
}

Best regards,
Pierre Sion

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions