diff options
Diffstat (limited to 'src/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java')
-rw-r--r-- | src/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java b/src/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java index d17cf33..8f14d74 100644 --- a/src/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java +++ b/src/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java @@ -33,6 +33,7 @@ import java.net.URLConnection; import java.util.StringTokenizer; import java.util.Vector; +import com.sun.org.apache.xerces.internal.dom.AbortException; import com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl; import com.sun.org.apache.xerces.internal.dom.DOMErrorImpl; import com.sun.org.apache.xerces.internal.dom.DOMLocatorImpl; @@ -117,7 +118,6 @@ public class DOMSerializerImpl implements LSSerializer, DOMConfiguration { private DOMErrorHandler fErrorHandler = null; private final DOMErrorImpl fError = new DOMErrorImpl(); private final DOMLocatorImpl fLocator = new DOMLocatorImpl(); - private static final RuntimeException abort = new RuntimeException(); /** * Constructs a new LSSerializer. @@ -539,11 +539,9 @@ public class DOMSerializerImpl implements LSSerializer, DOMConfiguration { } catch (LSException lse) { // Rethrow LSException. throw lse; + } catch (AbortException e) { + return null; } catch (RuntimeException e) { - if (e == DOMNormalizer.abort){ - // stopped at user request - return null; - } throw (LSException) new LSException(LSException.SERIALIZE_ERR, e.toString()).initCause(e); } catch (IOException ioe) { // REVISIT: A generic IOException doesn't provide enough information @@ -836,11 +834,9 @@ public class DOMSerializerImpl implements LSSerializer, DOMConfiguration { } catch (LSException lse) { // Rethrow LSException. throw lse; + } catch (AbortException e) { + return false; } catch (RuntimeException e) { - if (e == DOMNormalizer.abort){ - // stopped at user request - return false; - } throw (LSException) DOMUtil.createLSException(LSException.SERIALIZE_ERR, e).fillInStackTrace(); } catch (Exception e) { if (ser.fDOMErrorHandler != null) { @@ -992,11 +988,9 @@ public class DOMSerializerImpl implements LSSerializer, DOMConfiguration { } catch (LSException lse) { // Rethrow LSException. throw lse; + } catch (AbortException e) { + return false; } catch (RuntimeException e) { - if (e == DOMNormalizer.abort){ - // stopped at user request - return false; - } throw (LSException) DOMUtil.createLSException(LSException.SERIALIZE_ERR, e).fillInStackTrace(); } catch (Exception e) { if (ser.fDOMErrorHandler != null) { |