Fix Exception bug.

This commit is contained in:
Christian P. MOMON 2010-02-25 03:07:21 +01:00
parent 2975a00422
commit ede8394ce2
2 changed files with 7 additions and 6 deletions

View file

@ -717,23 +717,24 @@ public class Presenter
db.setErrorHandler (errorHandler);
Schema schema = db.getSchema ();
System.out.println("schema=" + schema);
logger.debug ("schema=" + schema);
// Parse the input file.
result = db.parse (source);
System.out.println("ZO4");
if (errorHandler.hasError ())
{
System.out.println("ZO4a");
throw new Exception (errorHandler.toString ());
// Most time, error is (with StringPresenter):
// "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
{
System.out.println("ZO4b");
DomPresenter.addMetaTag (result, "generator", "XID 0.0");
}
System.out.println("ZO5");
}
catch (ParserConfigurationException exception)
{