List of usage examples for org.xml.sax SAXException getException
public Exception getException()
From source file:org.xulux.dataprovider.DictionaryHandler.java
/** * Read the dictionary from an inputstream * @param stream the stream with the dictionary xml *//* w ww . j a v a 2s .com*/ public void read(InputStream stream) { SAXParser saxParser = null; SAXParserFactory factory = SAXParserFactory.newInstance(); factory.setValidating(false); try { saxParser = factory.newSAXParser(); try { saxParser.parse(stream, this); } catch (SAXException se) { se.printStackTrace(System.err); se.getException().printStackTrace(System.err); } } catch (Exception e) { e.printStackTrace(System.out); } // and clean up.. saxParser = null; factory = null; }
From source file:org.xulux.guidriver.XuluxGuiDriver.java
/** * Start processing the xml/* www . j ava2 s .c o m*/ * @param stream the stream containing the xml */ public void read(InputStream stream) { if (factory == null) { factory = SAXParserFactory.newInstance(); factory.setValidating(false); } try { SAXParser saxParser = factory.newSAXParser(); try { saxParser.parse(stream, this); stream.close(); } catch (SAXException se) { if (log.isFatalEnabled()) { log.fatal("Exception during parsing of part xml", se); log.fatal("Exception during parsing of part xml", se.getException()); } } finally { // and clean up.. saxParser = null; } } catch (Exception e) { if (log.isFatalEnabled()) { log.fatal("Exception during parsing of part xml", e); } } }