New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error handling in BrEditor #1

Closed
pierre-sion opened this Issue Jun 25, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@pierre-sion

pierre-sion commented Jun 25, 2014

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

@mfuchs23

This comment has been minimized.

Show comment
Hide comment
@mfuchs23

mfuchs23 Jun 25, 2014

Owner

Hello Pierre,

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

Regards,
Michael

Owner

mfuchs23 commented Jun 25, 2014

Hello Pierre,

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

Regards,
Michael

@mfuchs23 mfuchs23 closed this Jun 25, 2014

@mfuchs23 mfuchs23 reopened this Jun 25, 2014

@mfuchs23 mfuchs23 added this to the 8.0.1 milestone Jun 25, 2014

@mfuchs23 mfuchs23 self-assigned this Jun 25, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment