mirror of https://github.com/apache/poi.git
bug 61170: add extra logging to SaxHelper.
Thanks to PJ Fanning for the patch! This closes #58 on github. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798792 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
87591edbf3
commit
7413857e16
|
@ -62,9 +62,20 @@ public final class SAXHelper {
|
|||
|
||||
private static final SAXParserFactory saxFactory;
|
||||
static {
|
||||
saxFactory = SAXParserFactory.newInstance();
|
||||
saxFactory.setValidating(false);
|
||||
saxFactory.setNamespaceAware(true);
|
||||
try {
|
||||
saxFactory = SAXParserFactory.newInstance();
|
||||
saxFactory.setValidating(false);
|
||||
saxFactory.setNamespaceAware(true);
|
||||
} catch (RuntimeException re) {
|
||||
logger.log(POILogger.WARN, "Failed to create SAXParserFactory", re);
|
||||
throw re;
|
||||
} catch (Exception e) {
|
||||
logger.log(POILogger.WARN, "Failed to create SAXParserFactory", e);
|
||||
throw new RuntimeException("Failed to create SAXParserFactory", e);
|
||||
} catch (Error e) {
|
||||
logger.log(POILogger.WARN, "Failed to create SAXParserFactory", e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
private static void trySetSAXFeature(XMLReader xmlReader, String feature) {
|
||||
|
|
Loading…
Reference in New Issue