Skip to content
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
Closed

Improve error handling in BrEditor #1

pierre-sion opened this issue Jun 25, 2014 · 1 comment
Assignees
Milestone

Comments

@pierre-sion
Copy link

@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
Copy link
Owner

@mfuchs23 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.