Skip to content

reader/validation: throw informative exception #12

@bertsky

Description

@bertsky

I sometimes have trouble debugging PAGE-XML documents that just won't open in PageViewer, despite the fact that they validate under the schema and there is no obvious mistake. The problem is that PageViewer won't tell you (except that when it outright crashes, you at least get a stack trace).

Now I digged into /PrimaDla/src/org/primaresearch/dla/page/io/xml/XmlPageReader.java and found that XmlPageReader.read() does have all the information in a PageErrorHandler instance called lastErrors. But this gets thrown away.

Why is this not piggy-backed on an exception which PageViewer's event listener can then react on?

For example, it would help seeing (at least on the console):

There is no ID/IDREF binding for IDREF 'region0015'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions