Skip to content

Improve error handling in BrEditor #1

Closed

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

Activity

  1. mfuchs23 commented on Jun 25, 2014

    @mfuchs23
    Owner

    Hello Pierre,

    the class cast isn't necessary any more at all. I will remove it in the next release.

    Regards,
    Michael

  2. added this to the 8.0.1 milestone on Jun 25, 2014
  3. self-assigned this
    on Jun 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions