Fix Exception bug.
This commit is contained in:
parent
2975a00422
commit
ede8394ce2
2 changed files with 7 additions and 6 deletions
Binary file not shown.
|
@ -717,23 +717,24 @@ public class Presenter
|
||||||
db.setErrorHandler (errorHandler);
|
db.setErrorHandler (errorHandler);
|
||||||
|
|
||||||
Schema schema = db.getSchema ();
|
Schema schema = db.getSchema ();
|
||||||
System.out.println("schema=" + schema);
|
|
||||||
logger.debug ("schema=" + schema);
|
logger.debug ("schema=" + schema);
|
||||||
|
|
||||||
// Parse the input file.
|
// Parse the input file.
|
||||||
result = db.parse (source);
|
result = db.parse (source);
|
||||||
System.out.println("ZO4");
|
|
||||||
if (errorHandler.hasError ())
|
if (errorHandler.hasError ())
|
||||||
{
|
{
|
||||||
System.out.println("ZO4a");
|
// Most time, error is (with StringPresenter):
|
||||||
throw new Exception (errorHandler.toString ());
|
// "Error at line 1 : Document root element "html", must match DOCTYPE root "null".
|
||||||
|
// Error at line 1 : Document is invalid: no grammar found.
|
||||||
|
// We ignore it. STU
|
||||||
|
logger.debug(errorHandler.toString ());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
System.out.println("ZO4b");
|
|
||||||
DomPresenter.addMetaTag (result, "generator", "XID 0.0");
|
DomPresenter.addMetaTag (result, "generator", "XID 0.0");
|
||||||
}
|
}
|
||||||
System.out.println("ZO5");
|
|
||||||
}
|
}
|
||||||
catch (ParserConfigurationException exception)
|
catch (ParserConfigurationException exception)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue