org.xml.sax.ErrorHandler#fatalError ( )源码实例Demo

下面列出了org.xml.sax.ErrorHandler#fatalError ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: spring-analysis-note   文件: MarshallingSource.java
private void parse() throws SAXException {
	SAXResult result = new SAXResult(getContentHandler());
	result.setLexicalHandler(getLexicalHandler());
	try {
		this.marshaller.marshal(this.content, result);
	}
	catch (IOException ex) {
		SAXParseException saxException = new SAXParseException(ex.getMessage(), null, null, -1, -1, ex);
		ErrorHandler errorHandler = getErrorHandler();
		if (errorHandler != null) {
			errorHandler.fatalError(saxException);
		}
		else {
			throw saxException;
		}
	}
}
 
源代码2 项目: java-technology-stack   文件: MarshallingSource.java
private void parse() throws SAXException {
	SAXResult result = new SAXResult(getContentHandler());
	result.setLexicalHandler(getLexicalHandler());
	try {
		this.marshaller.marshal(this.content, result);
	}
	catch (IOException ex) {
		SAXParseException saxException = new SAXParseException(ex.getMessage(), null, null, -1, -1, ex);
		ErrorHandler errorHandler = getErrorHandler();
		if (errorHandler != null) {
			errorHandler.fatalError(saxException);
		}
		else {
			throw saxException;
		}
	}
}
 
源代码3 项目: spring4-understanding   文件: MarshallingSource.java
private void parse() throws SAXException {
	SAXResult result = new SAXResult(getContentHandler());
	result.setLexicalHandler(getLexicalHandler());
	try {
		this.marshaller.marshal(this.content, result);
	}
	catch (IOException ex) {
		SAXParseException saxException = new SAXParseException(ex.getMessage(), null, null, -1, -1, ex);
		ErrorHandler errorHandler = getErrorHandler();
		if (errorHandler != null) {
			errorHandler.fatalError(saxException);
		}
		else {
			throw saxException;
		}
	}
}
 
源代码4 项目: jolie   文件: JAXPParser.java
public void parse( InputSource source, ContentHandler handler,
    ErrorHandler errorHandler, EntityResolver entityResolver )
    
    throws SAXException, IOException {
    
    try {
        XMLReader reader = factory.newSAXParser().getXMLReader();
        reader = new XMLReaderEx(reader);
        
        reader.setContentHandler(handler);
        if(errorHandler!=null)
            reader.setErrorHandler(errorHandler);
        if(entityResolver!=null)
            reader.setEntityResolver(entityResolver);
        reader.parse(source);
    } catch( ParserConfigurationException e ) {
        // in practice this won't happen
        SAXParseException spe = new SAXParseException(e.getMessage(),null,e);
        errorHandler.fatalError(spe);
        throw spe;
    }
}
 
源代码5 项目: TencentKona-8   文件: JAXBHeader.java
public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
    try {
        bridge.marshal(jaxbObject,contentHandler,null);
    } catch (JAXBException e) {
        SAXParseException x = new SAXParseException(e.getMessage(),null,null,-1,-1,e);
        errorHandler.fatalError(x);
        throw x;
    }
}
 
源代码6 项目: jdk8u60   文件: JAXBHeader.java
public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
    try {
        bridge.marshal(jaxbObject,contentHandler,null);
    } catch (JAXBException e) {
        SAXParseException x = new SAXParseException(e.getMessage(),null,null,-1,-1,e);
        errorHandler.fatalError(x);
        throw x;
    }
}
 
源代码7 项目: openjdk-jdk8u   文件: JAXBHeader.java
public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
    try {
        bridge.marshal(jaxbObject,contentHandler,null);
    } catch (JAXBException e) {
        SAXParseException x = new SAXParseException(e.getMessage(),null,null,-1,-1,e);
        errorHandler.fatalError(x);
        throw x;
    }
}
 
源代码8 项目: openjdk-jdk8u-backup   文件: JAXBHeader.java
public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
    try {
        bridge.marshal(jaxbObject,contentHandler,null);
    } catch (JAXBException e) {
        SAXParseException x = new SAXParseException(e.getMessage(),null,null,-1,-1,e);
        errorHandler.fatalError(x);
        throw x;
    }
}
 
源代码9 项目: openjdk-jdk9   文件: JAXBHeader.java
public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
    try {
        bridge.marshal(jaxbObject,contentHandler,null);
    } catch (JAXBException e) {
        SAXParseException x = new SAXParseException(e.getMessage(),null,null,-1,-1,e);
        errorHandler.fatalError(x);
        throw x;
    }
}
 
源代码10 项目: hottub   文件: JAXBHeader.java
public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
    try {
        bridge.marshal(jaxbObject,contentHandler,null);
    } catch (JAXBException e) {
        SAXParseException x = new SAXParseException(e.getMessage(),null,null,-1,-1,e);
        errorHandler.fatalError(x);
        throw x;
    }
}
 
源代码11 项目: openjdk-8-source   文件: JAXBHeader.java
public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
    try {
        bridge.marshal(jaxbObject,contentHandler,null);
    } catch (JAXBException e) {
        SAXParseException x = new SAXParseException(e.getMessage(),null,null,-1,-1,e);
        errorHandler.fatalError(x);
        throw x;
    }
}
 
源代码12 项目: openjdk-8   文件: JAXBHeader.java
public void writeTo(ContentHandler contentHandler, ErrorHandler errorHandler) throws SAXException {
    try {
        bridge.marshal(jaxbObject,contentHandler,null);
    } catch (JAXBException e) {
        SAXParseException x = new SAXParseException(e.getMessage(),null,null,-1,-1,e);
        errorHandler.fatalError(x);
        throw x;
    }
}
 
 方法所在类
 同类方法