当前位置: 首页>>代码示例>>Java>>正文


Java XNIException.getException方法代码示例

本文整理汇总了Java中org.apache.xerces.xni.XNIException.getException方法的典型用法代码示例。如果您正苦于以下问题:Java XNIException.getException方法的具体用法?Java XNIException.getException怎么用?Java XNIException.getException使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.xerces.xni.XNIException的用法示例。


在下文中一共展示了XNIException.getException方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: toSAXException

import org.apache.xerces.xni.XNIException; //导入方法依赖的package包/类
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);
}
 
开发者ID:relaxng,项目名称:jing-trang,代码行数:20,代码来源:ValidatorImpl.java

示例2: toSAXException

import org.apache.xerces.xni.XNIException; //导入方法依赖的package包/类
/**
 * 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());
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:11,代码来源:Util.java

示例3: toSAXException

import org.apache.xerces.xni.XNIException; //导入方法依赖的package包/类
/**
 * Converts the {@link XNIException} received from a downstream
 * component to a {@link SAXException}.
 */
private SAXException toSAXException( XNIException xe ) {
    Exception e = xe.getException();
    if( e==null )   e = xe;
    if( e instanceof SAXException )  return (SAXException)e;
    return new SAXException(e);
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:11,代码来源:JAXPValidatorComponent.java

示例4: convertToSAXException

import org.apache.xerces.xni.XNIException; //导入方法依赖的package包/类
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);
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:11,代码来源:SchemaContentHandler.java

示例5: parseASInputSource

import org.apache.xerces.xni.XNIException; //导入方法依赖的package包/类
/**
 * Parse a Abstract Schema from a location identified by an
 * <code>LSInput</code>.
 *
 * @param is The <code>LSInput</code> from which the source
 *   Abstract Schema is to be read.
 * @return The newly created <code>ASModel</code>.
 * @exception DOMASException
 *   Exceptions raised by <code>parseASURI()</code> originate with the
 *   installed ErrorHandler, and thus depend on the implementation of
 *   the <code>DOMErrorHandler</code> interfaces. The default error
 *   handlers will raise a <code>DOMASException</code> if any form of
 *   Abstract Schema inconsistencies or warning occurs during the parse,
 *   but application defined errorHandlers are not required to do so.
 *   <br> WRONG_MIME_TYPE_ERR: Raised when <code>mimeTypeCheck</code> is
 *   true and the inputsource has an incorrect MIME Type. See attribute
 *   <code>mimeTypeCheck</code>.
 * @exception DOMSystemException
 *   Exceptions raised by <code>parseURI()</code> originate with the
 *   installed ErrorHandler, and thus depend on the implementation of
 *   the <code>DOMErrorHandler</code> interfaces. The default error
 *   handlers will raise a DOMSystemException if any form I/O or other
 *   system error occurs during the parse, but application defined error
 *   handlers are not required to do so.
 */
public ASModel parseASInputSource(LSInput is)
                                  throws DOMASException, Exception {
                                  
    // need to wrap the LSInput with an XMLInputSource
    XMLInputSource xis = this.dom2xmlInputSource(is);
    try {
        return parseASInputSource(xis);
    }
    catch (XNIException e) {
        Exception ex = e.getException();
        throw ex;
    }
}
 
开发者ID:AaronZhangL,项目名称:SplitCharater,代码行数:39,代码来源:DOMASBuilderImpl.java


注:本文中的org.apache.xerces.xni.XNIException.getException方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。