Java Code Examples for com.sun.org.apache.xerces.internal.xni.parser.XMLParseException#getException()

The following examples show how to use com.sun.org.apache.xerces.internal.xni.parser.XMLParseException#getException() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SchemaContentHandler.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
static void convertToSAXParseException(XMLParseException e) throws SAXException {
    Exception ex = e.getException();
    if (ex == null) {
        // must be a parser exception; mine it for locator info and throw
        // a SAXParseException
        LocatorImpl locatorImpl = new LocatorImpl();
        locatorImpl.setPublicId(e.getPublicId());
        locatorImpl.setSystemId(e.getExpandedSystemId());
        locatorImpl.setLineNumber(e.getLineNumber());
        locatorImpl.setColumnNumber(e.getColumnNumber());
        throw new SAXParseException(e.getMessage(), locatorImpl);
    }
    if (ex instanceof SAXException) {
        // why did we create an XMLParseException?
        throw (SAXException) ex;
    }
    throw new SAXException(ex);
}
 
Example 2
Source File: SchemaContentHandler.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
static void convertToSAXParseException(XMLParseException e) throws SAXException {
    Exception ex = e.getException();
    if (ex == null) {
        // must be a parser exception; mine it for locator info and throw
        // a SAXParseException
        LocatorImpl locatorImpl = new LocatorImpl();
        locatorImpl.setPublicId(e.getPublicId());
        locatorImpl.setSystemId(e.getExpandedSystemId());
        locatorImpl.setLineNumber(e.getLineNumber());
        locatorImpl.setColumnNumber(e.getColumnNumber());
        throw new SAXParseException(e.getMessage(), locatorImpl);
    }
    if (ex instanceof SAXException) {
        // why did we create an XMLParseException?
        throw (SAXException) ex;
    }
    throw new SAXException(ex);
}
 
Example 3
Source File: SchemaContentHandler.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
static void convertToSAXParseException(XMLParseException e) throws SAXException {
    Exception ex = e.getException();
    if (ex == null) {
        // must be a parser exception; mine it for locator info and throw
        // a SAXParseException
        LocatorImpl locatorImpl = new LocatorImpl();
        locatorImpl.setPublicId(e.getPublicId());
        locatorImpl.setSystemId(e.getExpandedSystemId());
        locatorImpl.setLineNumber(e.getLineNumber());
        locatorImpl.setColumnNumber(e.getColumnNumber());
        throw new SAXParseException(e.getMessage(), locatorImpl);
    }
    if (ex instanceof SAXException) {
        // why did we create an XMLParseException?
        throw (SAXException) ex;
    }
    throw new SAXException(ex);
}
 
Example 4
Source File: SchemaContentHandler.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
static void convertToSAXParseException(XMLParseException e) throws SAXException {
    Exception ex = e.getException();
    if (ex == null) {
        // must be a parser exception; mine it for locator info and throw
        // a SAXParseException
        LocatorImpl locatorImpl = new LocatorImpl();
        locatorImpl.setPublicId(e.getPublicId());
        locatorImpl.setSystemId(e.getExpandedSystemId());
        locatorImpl.setLineNumber(e.getLineNumber());
        locatorImpl.setColumnNumber(e.getColumnNumber());
        throw new SAXParseException(e.getMessage(), locatorImpl);
    }
    if (ex instanceof SAXException) {
        // why did we create an XMLParseException?
        throw (SAXException) ex;
    }
    throw new SAXException(ex);
}
 
Example 5
Source File: SchemaContentHandler.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
static void convertToSAXParseException(XMLParseException e) throws SAXException {
    Exception ex = e.getException();
    if (ex == null) {
        // must be a parser exception; mine it for locator info and throw
        // a SAXParseException
        LocatorImpl locatorImpl = new LocatorImpl();
        locatorImpl.setPublicId(e.getPublicId());
        locatorImpl.setSystemId(e.getExpandedSystemId());
        locatorImpl.setLineNumber(e.getLineNumber());
        locatorImpl.setColumnNumber(e.getColumnNumber());
        throw new SAXParseException(e.getMessage(), locatorImpl);
    }
    if (ex instanceof SAXException) {
        // why did we create an XMLParseException?
        throw (SAXException) ex;
    }
    throw new SAXException(ex);
}
 
Example 6
Source File: SchemaContentHandler.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
static void convertToSAXParseException(XMLParseException e) throws SAXException {
    Exception ex = e.getException();
    if (ex == null) {
        // must be a parser exception; mine it for locator info and throw
        // a SAXParseException
        LocatorImpl locatorImpl = new LocatorImpl();
        locatorImpl.setPublicId(e.getPublicId());
        locatorImpl.setSystemId(e.getExpandedSystemId());
        locatorImpl.setLineNumber(e.getLineNumber());
        locatorImpl.setColumnNumber(e.getColumnNumber());
        throw new SAXParseException(e.getMessage(), locatorImpl);
    }
    if (ex instanceof SAXException) {
        // why did we create an XMLParseException?
        throw (SAXException) ex;
    }
    throw new SAXException(ex);
}
 
Example 7
Source File: ErrorHandlerWrapper.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a SAXParseException from an XMLParseException. */
protected static SAXParseException createSAXParseException(XMLParseException exception) {
    return new SAXParseException(exception.getMessage(),
                                 exception.getPublicId(),
                                 exception.getExpandedSystemId(),
                                 exception.getLineNumber(),
                                 exception.getColumnNumber(),
                                 exception.getException());
}
 
Example 8
Source File: Util.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
public static SAXParseException toSAXParseException( XMLParseException e ) {
    if( e.getException() instanceof SAXParseException )
        return (SAXParseException)e.getException();
    return new SAXParseException( e.getMessage(),
    e.getPublicId(), e.getExpandedSystemId(),
    e.getLineNumber(), e.getColumnNumber(),
    e.getException() );
}
 
Example 9
Source File: Util.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
public static SAXParseException toSAXParseException( XMLParseException e ) {
    if( e.getException() instanceof SAXParseException )
        return (SAXParseException)e.getException();
    return new SAXParseException( e.getMessage(),
    e.getPublicId(), e.getExpandedSystemId(),
    e.getLineNumber(), e.getColumnNumber(),
    e.getException() );
}
 
Example 10
Source File: ErrorHandlerWrapper.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a SAXParseException from an XMLParseException. */
protected static SAXParseException createSAXParseException(XMLParseException exception) {
    return new SAXParseException(exception.getMessage(),
                                 exception.getPublicId(),
                                 exception.getExpandedSystemId(),
                                 exception.getLineNumber(),
                                 exception.getColumnNumber(),
                                 exception.getException());
}
 
Example 11
Source File: Util.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
public static SAXParseException toSAXParseException( XMLParseException e ) {
    if( e.getException() instanceof SAXParseException )
        return (SAXParseException)e.getException();
    return new SAXParseException( e.getMessage(),
    e.getPublicId(), e.getExpandedSystemId(),
    e.getLineNumber(), e.getColumnNumber(),
    e.getException() );
}
 
Example 12
Source File: ErrorHandlerWrapper.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a SAXParseException from an XMLParseException. */
protected static SAXParseException createSAXParseException(XMLParseException exception) {
    return new SAXParseException(exception.getMessage(),
                                 exception.getPublicId(),
                                 exception.getExpandedSystemId(),
                                 exception.getLineNumber(),
                                 exception.getColumnNumber(),
                                 exception.getException());
}
 
Example 13
Source File: Util.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public static SAXParseException toSAXParseException( XMLParseException e ) {
    if( e.getException() instanceof SAXParseException )
        return (SAXParseException)e.getException();
    return new SAXParseException( e.getMessage(),
    e.getPublicId(), e.getExpandedSystemId(),
    e.getLineNumber(), e.getColumnNumber(),
    e.getException() );
}
 
Example 14
Source File: ErrorHandlerWrapper.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a SAXParseException from an XMLParseException. */
protected static SAXParseException createSAXParseException(XMLParseException exception) {
    return new SAXParseException(exception.getMessage(),
                                 exception.getPublicId(),
                                 exception.getExpandedSystemId(),
                                 exception.getLineNumber(),
                                 exception.getColumnNumber(),
                                 exception.getException());
}
 
Example 15
Source File: ErrorHandlerWrapper.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a SAXParseException from an XMLParseException. */
protected static SAXParseException createSAXParseException(XMLParseException exception) {
    return new SAXParseException(exception.getMessage(),
                                 exception.getPublicId(),
                                 exception.getExpandedSystemId(),
                                 exception.getLineNumber(),
                                 exception.getColumnNumber(),
                                 exception.getException());
}
 
Example 16
Source File: Util.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public static SAXParseException toSAXParseException( XMLParseException e ) {
    if( e.getException() instanceof SAXParseException )
        return (SAXParseException)e.getException();
    return new SAXParseException( e.getMessage(),
    e.getPublicId(), e.getExpandedSystemId(),
    e.getLineNumber(), e.getColumnNumber(),
    e.getException() );
}
 
Example 17
Source File: ErrorHandlerWrapper.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a SAXParseException from an XMLParseException. */
protected static SAXParseException createSAXParseException(XMLParseException exception) {
    return new SAXParseException(exception.getMessage(),
                                 exception.getPublicId(),
                                 exception.getExpandedSystemId(),
                                 exception.getLineNumber(),
                                 exception.getColumnNumber(),
                                 exception.getException());
}
 
Example 18
Source File: Util.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
public static SAXParseException toSAXParseException( XMLParseException e ) {
    if( e.getException() instanceof SAXParseException )
        return (SAXParseException)e.getException();
    return new SAXParseException( e.getMessage(),
    e.getPublicId(), e.getExpandedSystemId(),
    e.getLineNumber(), e.getColumnNumber(),
    e.getException() );
}
 
Example 19
Source File: Util.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public static SAXParseException toSAXParseException( XMLParseException e ) {
    if( e.getException() instanceof SAXParseException )
        return (SAXParseException)e.getException();
    return new SAXParseException( e.getMessage(),
    e.getPublicId(), e.getExpandedSystemId(),
    e.getLineNumber(), e.getColumnNumber(),
    e.getException() );
}
 
Example 20
Source File: ErrorHandlerWrapper.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/** Creates a SAXParseException from an XMLParseException. */
protected static SAXParseException createSAXParseException(XMLParseException exception) {
    return new SAXParseException(exception.getMessage(),
                                 exception.getPublicId(),
                                 exception.getExpandedSystemId(),
                                 exception.getLineNumber(),
                                 exception.getColumnNumber(),
                                 exception.getException());
}