List of usage examples for org.xml.sax SAXException printStackTrace
public void printStackTrace(PrintStream s)
From source file:org.sipfoundry.sipxbridge.symmitron.SymmitronConfigParser.java
public SymmitronConfig parse(String url) { // Create a Digester instance Digester digester = new Digester(); // digester.setSchema("file:schema/sipxrelay.xsd"); addRules(digester);/*from ww w. j a v a2 s . c o m*/ // Process the input file. try { InputSource inputSource = new InputSource(url); digester.parse(inputSource); return (SymmitronConfig) digester.getRoot(); } catch (java.io.IOException ioe) { // Note that we do not have a debug file here so we need to print to stderr. ioe.printStackTrace(System.err); throw new SymmitronException("Intiialzation exception", ioe); } catch (org.xml.sax.SAXException se) { se.printStackTrace(System.err); throw new SymmitronException("Intiialzation exception", se); } }
From source file:org.xulux.dataprovider.DictionaryHandler.java
/** * Read the dictionary from an inputstream * @param stream the stream with the dictionary xml *//*from w ww . jav a2 s . c o m*/ 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; }