static void convertToSAXException(XNIException e) throws SAXException { Exception ex = e.getException(); if (ex == null) { throw new SAXException(e.getMessage()); } if (ex instanceof SAXException) { throw (SAXException) ex; } throw new SAXException(ex); }
/** * Reconstructs {@link SAXException} from XNIException. */ public static SAXException toSAXException(XNIException e) { if(e instanceof XMLParseException) return toSAXParseException((XMLParseException)e); if( e.getException() instanceof SAXException ) return (SAXException)e.getException(); return new SAXException(e.getMessage(),e.getException()); }
static SAXException toSAXException(XNIException e) { if (e instanceof XMLParseException) { XMLParseException pe = (XMLParseException)e; return new SAXParseException(pe.getMessage(), pe.getPublicId(), pe.getExpandedSystemId(), pe.getLineNumber(), pe.getColumnNumber(), pe.getException()); } Exception nested = e.getException(); if (nested == null) return new SAXException(e.getMessage()); if (nested instanceof SAXException) return (SAXException)nested; if (nested instanceof RuntimeException) throw (RuntimeException)nested; return new SAXException(nested); } }
static SAXException toSAXException(XNIException e) { if (e instanceof XMLParseException) { XMLParseException pe = (XMLParseException)e; return new SAXParseException(pe.getMessage(), pe.getPublicId(), pe.getExpandedSystemId(), pe.getLineNumber(), pe.getColumnNumber(), pe.getException()); } Exception nested = e.getException(); if (nested == null) return new SAXException(e.getMessage()); if (nested instanceof SAXException) return (SAXException)nested; if (nested instanceof RuntimeException) throw (RuntimeException)nested; return new SAXException(nested); } }
Exception ex = e.getException(); if (ex == null) { throw new SAXException(e.getMessage());
Exception ex = e.getException(); if (ex == null) { throw new SAXException(e.getMessage());
Exception ex = e.getException(); if (ex == null) { throw new SAXException(e.getMessage());
Exception ex = e.getException(); if (ex == null) { throw new SAXException(e.getMessage());
new Object[] { href, ex.getMessage()}); return false;