e.initCause(e.getException());
@Override public synchronized Throwable initCause(Throwable cause) { this.cause = cause; return super.initCause(cause); }
/** * getValue ... * * @see org.geotools.xml.schema.Type#getValue(org.geotools.xml.schema.Element, * org.geotools.xml.schema.ElementValue[], org.xml.sax.Attributes, java.util.Map) * @param element * @param value * @param attrs1 * @param hints * @throws OperationNotSupportedException */ public Object getValue(Element element, ElementValue[] value, Attributes attrs1, Map hints) throws SAXException { String href = attrs1.getValue("", attrs[0].getName()); if (href == null || "".equals(href)) { href = attrs1.getValue(attrs[0].getNamespace().toString(), attrs[0].getName()); } try { return new URL(href); } catch (MalformedURLException e) { SAXException ee = new SAXException(e.getMessage()); ee.initCause(e); throw ee; } } }
+ qName, e); exception.initCause(e); throw exception; } finally {
e.initCause(e.getException());
+ qName, e); exception.initCause(e); throw exception;
/** * Must be called first. */ @Override public void startDocument() throws SAXException { try { writer.write("<!DOCTYPE html>\n"); } catch (IOException e) { throw (SAXException) new SAXException(e).initCause(e); } }
/** * Create a SAXException that wraps the given IOException. * The wrapping is done using the standard Java 1.4 mechanism, * so that getCause() will work. Note that new SAXException(Exception) * does NOT work. * @param e an IOException to wrap * @return a SAX exception for which <code>getCause()</code> will return <code>e</code>. */ public SAXException wrapAsSAXException(IOException e) { SAXException saxEx =new SAXException(e.getMessage()); saxEx.initCause(e); return saxEx; }
public void error(SAXParseException e) throws SAXException { SAXException saxe = new SAXException("Error Handling [" + this.source + "@" + e.getLineNumber() + "," + e.getColumnNumber() + "]"); saxe.initCause(e); throw saxe; }
public void error(SAXParseException e) throws SAXException { SAXException saxe = new SAXException("Error Handling [" + this.source + "@" + e.getLineNumber() + "," + e.getColumnNumber() + "]"); saxe.initCause(e); throw saxe; }
public void error(SAXParseException e) throws SAXException { SAXException saxe = new SAXException("Error Handling [" + this.source + "@" + e.getLineNumber() + "," + e.getColumnNumber() + "]"); saxe.initCause(e); throw saxe; }
/** * Must be called last. * * @throws SAXException if there are IO problems */ @Override public void endDocument() throws SAXException { try { writer.write('\n'); } catch (IOException e) { throw (SAXException) new SAXException(e).initCause(e); } }
public void error(SAXParseException e) throws SAXException { SAXException saxe = new SAXException("Error Handling [" + this.source + "@" + e.getLineNumber() + "," + e.getColumnNumber() + "]"); saxe.initCause(e); throw saxe; }
public void error(SAXParseException e) throws SAXException { SAXException saxe = new SAXException("Error Handling [" + this.source + "@" + e.getLineNumber() + "," + e.getColumnNumber() + "]"); saxe.initCause(e); throw saxe; }
/** * Obtains the HTML of the response as a dom4j document. */ static Document getDom4j( WebResponse wr ) throws IOException, SAXException { try { return new SAXReader(new SAXParser()).read(new StringReader(wr.getText())); } catch (DocumentException e) { SAXException se = new SAXException(e); se.initCause(e); throw se; } }
/** * Returns a SAXException with the source file name and the given error * message. */ protected SAXException getException(Message msg, Throwable cause) { if (cause != null && _log != null && _log.isTraceEnabled()) _log.trace(_loc.get("sax-exception", getSourceName(), _location.getLocation()), cause); SAXException e = new SAXException(getSourceName() + currentLocation() + ": " + msg + " [" + cause + "]"); e.initCause(cause); return e; }
/** * Returns a SAXException with the source file name and the given error * message. */ protected SAXException getException(Message msg, Throwable cause) { if (cause != null && _log != null && _log.isTraceEnabled()) _log.trace(_loc.get("sax-exception", getSourceName(), _location.getLocation()), cause); SAXException e = new SAXException(getSourceName() + currentLocation() + ": " + msg + " [" + cause + "]"); e.initCause(cause); return e; }
/** * Returns a SAXException with the source file name and the given error * message. */ protected SAXException getException(Message msg, Throwable cause) { if (cause != null && _log != null && _log.isTraceEnabled()) _log.trace(_loc.get("sax-exception", getSourceName(), _location.getLocation()), cause); SAXException e = new SAXException(getSourceName() + currentLocation() + ": " + msg + " [" + cause + "]"); e.initCause(cause); return e; }
/** * Returns a SAXException with the source file name and the given error * message. */ protected SAXException getException(Message msg, Throwable cause) { if (cause != null && _log != null && _log.isTraceEnabled()) _log.trace(_loc.get("sax-exception", getSourceName(), _location.getLocation()), cause); SAXException e = new SAXException(getSourceName() + currentLocation() + ": " + msg + " [" + cause + "]"); e.initCause(cause); return e; } }