类org.w3c.dom.DOMError源码实例Demo

下面列出了怎么用org.w3c.dom.DOMError的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: jdk1.8-source-analysis   文件: DOMNormalizer.java
/**
 * Reports a DOM error to the user handler.
 *
 * If the error is fatal, the processing will be always aborted.
 */
public static final void reportDOMError(DOMErrorHandler errorHandler, DOMErrorImpl error, DOMLocatorImpl locator,
                    String message, short severity, String type ) {
    if( errorHandler!=null ) {
        error.reset();
        error.fMessage = message;
        error.fSeverity = severity;
        error.fLocator = locator;
        error.fType = type;
        error.fRelatedData = locator.fRelatedNode;

        if(!errorHandler.handleError(error))
            throw abort;
    }
    if( severity==DOMError.SEVERITY_FATAL_ERROR )
        throw abort;
}
 
源代码2 项目: hottub   文件: DOMNormalizer.java
/**
 * Reports a DOM error to the user handler.
 *
 * If the error is fatal, the processing will be always aborted.
 */
public static final void reportDOMError(DOMErrorHandler errorHandler, DOMErrorImpl error, DOMLocatorImpl locator,
                    String message, short severity, String type ) {
    if( errorHandler!=null ) {
        error.reset();
        error.fMessage = message;
        error.fSeverity = severity;
        error.fLocator = locator;
        error.fType = type;
        error.fRelatedData = locator.fRelatedNode;

        if(!errorHandler.handleError(error))
            throw abort;
    }
    if( severity==DOMError.SEVERITY_FATAL_ERROR )
        throw abort;
}
 
源代码3 项目: Bytecoder   文件: DOM3TreeWalker.java
/**
 * Checks if an Text node is well-formed, by checking if it contains invalid
 * XML characters.
 *
 * @param data The contents of the comment node
 */
protected void isTextWellFormed(Text node) {
    // Does the data valid XML character data
    Character invalidChar = isWFXMLChar(node.getData());
    if (invalidChar != null) {
        String msg =
            Utils.messages.createMessage(
                MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT,
                new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) });

        if (fErrorHandler != null) {
            fErrorHandler.handleError(
                new DOMErrorImpl(
                    DOMError.SEVERITY_FATAL_ERROR,
                    msg,
                    MsgKey.ER_WF_INVALID_CHARACTER,
                    null,
                    null,
                    null));
        }
    }
}
 
源代码4 项目: TencentKona-8   文件: DOMErrorHandlerWrapper.java
/**
 * Reports a warning. Warnings are non-fatal and can be safely ignored
 * by most applications.
 *
 * @param domain    The domain of the warning. The domain can be any
 *                  string but is suggested to be a valid URI. The
 *                  domain can be used to conveniently specify a web
 *                  site location of the relevent specification or
 *                  document pertaining to this warning.
 * @param key       The warning key. This key can be any string and
 *                  is implementation dependent.
 * @param exception Exception.
 *
 * @throws XNIException Thrown to signal that the parser should stop
 *                      parsing the document.
 */

public void warning(String domain, String key,
                    XMLParseException exception) throws XNIException {
    fDOMError.fSeverity = DOMError.SEVERITY_WARNING;
    fDOMError.fException = exception;
    // REVISIT: May need to lookup from DOMErrorTypeMap in the future.
    fDOMError.fType = key;
    fDOMError.fRelatedData = fDOMError.fMessage = exception.getMessage();
    DOMLocatorImpl locator = fDOMError.fLocator;
    if (locator != null) {
        locator.fColumnNumber = exception.getColumnNumber();
        locator.fLineNumber = exception.getLineNumber();
        locator.fUtf16Offset = exception.getCharacterOffset();
        locator.fUri = exception.getExpandedSystemId();
        locator.fRelatedNode = fCurrentNode;
    }
    if (fDomErrorHandler != null) {
        fDomErrorHandler.handleError(fDOMError);
    }
}
 
源代码5 项目: TencentKona-8   文件: DOMErrorHandlerWrapper.java
/**
 * Reports an error. Errors are non-fatal and usually signify that the
 * document is invalid with respect to its grammar(s).
 *
 * @param domain    The domain of the error. The domain can be any
 *                  string but is suggested to be a valid URI. The
 *                  domain can be used to conveniently specify a web
 *                  site location of the relevent specification or
 *                  document pertaining to this error.
 * @param key       The error key. This key can be any string and
 *                  is implementation dependent.
 * @param exception Exception.
 *
 * @throws XNIException Thrown to signal that the parser should stop
 *                      parsing the document.
 */
public void error(String domain, String key,
                  XMLParseException exception) throws XNIException {
    fDOMError.fSeverity = DOMError.SEVERITY_ERROR;
    fDOMError.fException = exception;
    // REVISIT: May need to lookup from DOMErrorTypeMap in the future.
    fDOMError.fType = key;
    fDOMError.fRelatedData = fDOMError.fMessage = exception.getMessage();
    DOMLocatorImpl locator = fDOMError.fLocator;
    if (locator != null) {
        locator.fColumnNumber = exception.getColumnNumber();
        locator.fLineNumber = exception.getLineNumber();
        locator.fUtf16Offset = exception.getCharacterOffset();
        locator.fUri = exception.getExpandedSystemId();
        locator.fRelatedNode= fCurrentNode;
    }
    if (fDomErrorHandler != null) {
        fDomErrorHandler.handleError(fDOMError);
    }
}
 
源代码6 项目: openjdk-jdk9   文件: DOMNormalizer.java
/**
 * Reports a DOM error to the user handler.
 *
 * If the error is fatal, the processing will be always aborted.
 */
public static final void reportDOMError(DOMErrorHandler errorHandler, DOMErrorImpl error, DOMLocatorImpl locator,
                    String message, short severity, String type ) {
    if( errorHandler!=null ) {
        error.reset();
        error.fMessage = message;
        error.fSeverity = severity;
        error.fLocator = locator;
        error.fType = type;
        error.fRelatedData = locator.fRelatedNode;

        if(!errorHandler.handleError(error))
            throw new AbortException();
    }
    if( severity==DOMError.SEVERITY_FATAL_ERROR )
        throw new AbortException();
}
 
源代码7 项目: openjdk-8   文件: DOMErrorHandlerWrapper.java
/**
 * Reports an error. Errors are non-fatal and usually signify that the
 * document is invalid with respect to its grammar(s).
 *
 * @param domain    The domain of the error. The domain can be any
 *                  string but is suggested to be a valid URI. The
 *                  domain can be used to conveniently specify a web
 *                  site location of the relevent specification or
 *                  document pertaining to this error.
 * @param key       The error key. This key can be any string and
 *                  is implementation dependent.
 * @param exception Exception.
 *
 * @throws XNIException Thrown to signal that the parser should stop
 *                      parsing the document.
 */
public void error(String domain, String key,
                  XMLParseException exception) throws XNIException {
    fDOMError.fSeverity = DOMError.SEVERITY_ERROR;
    fDOMError.fException = exception;
    // REVISIT: May need to lookup from DOMErrorTypeMap in the future.
    fDOMError.fType = key;
    fDOMError.fRelatedData = fDOMError.fMessage = exception.getMessage();
    DOMLocatorImpl locator = fDOMError.fLocator;
    if (locator != null) {
        locator.fColumnNumber = exception.getColumnNumber();
        locator.fLineNumber = exception.getLineNumber();
        locator.fUtf16Offset = exception.getCharacterOffset();
        locator.fUri = exception.getExpandedSystemId();
        locator.fRelatedNode= fCurrentNode;
    }
    if (fDomErrorHandler != null) {
        fDomErrorHandler.handleError(fDOMError);
    }
}
 
源代码8 项目: jdk8u60   文件: DOMNormalizer.java
/**
 * Reports a DOM error to the user handler.
 *
 * If the error is fatal, the processing will be always aborted.
 */
public static final void reportDOMError(DOMErrorHandler errorHandler, DOMErrorImpl error, DOMLocatorImpl locator,
                    String message, short severity, String type ) {
    if( errorHandler!=null ) {
        error.reset();
        error.fMessage = message;
        error.fSeverity = severity;
        error.fLocator = locator;
        error.fType = type;
        error.fRelatedData = locator.fRelatedNode;

        if(!errorHandler.handleError(error))
            throw abort;
    }
    if( severity==DOMError.SEVERITY_FATAL_ERROR )
        throw abort;
}
 
源代码9 项目: jdk8u60   文件: DOMErrorHandlerWrapper.java
/**
 * Reports a warning. Warnings are non-fatal and can be safely ignored
 * by most applications.
 *
 * @param domain    The domain of the warning. The domain can be any
 *                  string but is suggested to be a valid URI. The
 *                  domain can be used to conveniently specify a web
 *                  site location of the relevent specification or
 *                  document pertaining to this warning.
 * @param key       The warning key. This key can be any string and
 *                  is implementation dependent.
 * @param exception Exception.
 *
 * @throws XNIException Thrown to signal that the parser should stop
 *                      parsing the document.
 */

public void warning(String domain, String key,
                    XMLParseException exception) throws XNIException {
    fDOMError.fSeverity = DOMError.SEVERITY_WARNING;
    fDOMError.fException = exception;
    // REVISIT: May need to lookup from DOMErrorTypeMap in the future.
    fDOMError.fType = key;
    fDOMError.fRelatedData = fDOMError.fMessage = exception.getMessage();
    DOMLocatorImpl locator = fDOMError.fLocator;
    if (locator != null) {
        locator.fColumnNumber = exception.getColumnNumber();
        locator.fLineNumber = exception.getLineNumber();
        locator.fUtf16Offset = exception.getCharacterOffset();
        locator.fUri = exception.getExpandedSystemId();
        locator.fRelatedNode = fCurrentNode;
    }
    if (fDomErrorHandler != null) {
        fDomErrorHandler.handleError(fDOMError);
    }
}
 
源代码10 项目: Bytecoder   文件: DOMNormalizer.java
/**
 * Reports a DOM error to the user handler.
 *
 * If the error is fatal, the processing will be always aborted.
 */
public static final void reportDOMError(DOMErrorHandler errorHandler, DOMErrorImpl error, DOMLocatorImpl locator,
                    String message, short severity, String type ) {
    if( errorHandler!=null ) {
        error.reset();
        error.fMessage = message;
        error.fSeverity = severity;
        error.fLocator = locator;
        error.fType = type;
        error.fRelatedData = locator.fRelatedNode;

        if(!errorHandler.handleError(error))
            throw new AbortException();
    }
    if( severity==DOMError.SEVERITY_FATAL_ERROR )
        throw new AbortException();
}
 
源代码11 项目: openjdk-8-source   文件: DOMErrorHandlerWrapper.java
/**
 * Reports a warning. Warnings are non-fatal and can be safely ignored
 * by most applications.
 *
 * @param domain    The domain of the warning. The domain can be any
 *                  string but is suggested to be a valid URI. The
 *                  domain can be used to conveniently specify a web
 *                  site location of the relevent specification or
 *                  document pertaining to this warning.
 * @param key       The warning key. This key can be any string and
 *                  is implementation dependent.
 * @param exception Exception.
 *
 * @throws XNIException Thrown to signal that the parser should stop
 *                      parsing the document.
 */

public void warning(String domain, String key,
                    XMLParseException exception) throws XNIException {
    fDOMError.fSeverity = DOMError.SEVERITY_WARNING;
    fDOMError.fException = exception;
    // REVISIT: May need to lookup from DOMErrorTypeMap in the future.
    fDOMError.fType = key;
    fDOMError.fRelatedData = fDOMError.fMessage = exception.getMessage();
    DOMLocatorImpl locator = fDOMError.fLocator;
    if (locator != null) {
        locator.fColumnNumber = exception.getColumnNumber();
        locator.fLineNumber = exception.getLineNumber();
        locator.fUtf16Offset = exception.getCharacterOffset();
        locator.fUri = exception.getExpandedSystemId();
        locator.fRelatedNode = fCurrentNode;
    }
    if (fDomErrorHandler != null) {
        fDomErrorHandler.handleError(fDOMError);
    }
}
 
源代码12 项目: JDKSourceCode1.8   文件: DOMErrorHandlerWrapper.java
/**
 * Reports a warning. Warnings are non-fatal and can be safely ignored
 * by most applications.
 *
 * @param domain    The domain of the warning. The domain can be any
 *                  string but is suggested to be a valid URI. The
 *                  domain can be used to conveniently specify a web
 *                  site location of the relevent specification or
 *                  document pertaining to this warning.
 * @param key       The warning key. This key can be any string and
 *                  is implementation dependent.
 * @param exception Exception.
 *
 * @throws XNIException Thrown to signal that the parser should stop
 *                      parsing the document.
 */

public void warning(String domain, String key,
                    XMLParseException exception) throws XNIException {
    fDOMError.fSeverity = DOMError.SEVERITY_WARNING;
    fDOMError.fException = exception;
    // REVISIT: May need to lookup from DOMErrorTypeMap in the future.
    fDOMError.fType = key;
    fDOMError.fRelatedData = fDOMError.fMessage = exception.getMessage();
    DOMLocatorImpl locator = fDOMError.fLocator;
    if (locator != null) {
        locator.fColumnNumber = exception.getColumnNumber();
        locator.fLineNumber = exception.getLineNumber();
        locator.fUtf16Offset = exception.getCharacterOffset();
        locator.fUri = exception.getExpandedSystemId();
        locator.fRelatedNode = fCurrentNode;
    }
    if (fDomErrorHandler != null) {
        fDomErrorHandler.handleError(fDOMError);
    }
}
 
源代码13 项目: openjdk-jdk8u   文件: DOMNormalizer.java
/**
 * Reports a DOM error to the user handler.
 *
 * If the error is fatal, the processing will be always aborted.
 */
public static final void reportDOMError(DOMErrorHandler errorHandler, DOMErrorImpl error, DOMLocatorImpl locator,
                    String message, short severity, String type ) {
    if( errorHandler!=null ) {
        error.reset();
        error.fMessage = message;
        error.fSeverity = severity;
        error.fLocator = locator;
        error.fType = type;
        error.fRelatedData = locator.fRelatedNode;

        if(!errorHandler.handleError(error))
            throw new AbortException();
    }
    if( severity==DOMError.SEVERITY_FATAL_ERROR )
        throw new AbortException();
}
 
源代码14 项目: openjdk-jdk8u   文件: DOMErrorHandlerWrapper.java
/**
 * Reports a warning. Warnings are non-fatal and can be safely ignored
 * by most applications.
 *
 * @param domain    The domain of the warning. The domain can be any
 *                  string but is suggested to be a valid URI. The
 *                  domain can be used to conveniently specify a web
 *                  site location of the relevent specification or
 *                  document pertaining to this warning.
 * @param key       The warning key. This key can be any string and
 *                  is implementation dependent.
 * @param exception Exception.
 *
 * @throws XNIException Thrown to signal that the parser should stop
 *                      parsing the document.
 */

public void warning(String domain, String key,
                    XMLParseException exception) throws XNIException {
    fDOMError.fSeverity = DOMError.SEVERITY_WARNING;
    fDOMError.fException = exception;
    // REVISIT: May need to lookup from DOMErrorTypeMap in the future.
    fDOMError.fType = key;
    fDOMError.fRelatedData = fDOMError.fMessage = exception.getMessage();
    DOMLocatorImpl locator = fDOMError.fLocator;
    if (locator != null) {
        locator.fColumnNumber = exception.getColumnNumber();
        locator.fLineNumber = exception.getLineNumber();
        locator.fUtf16Offset = exception.getCharacterOffset();
        locator.fUri = exception.getExpandedSystemId();
        locator.fRelatedNode = fCurrentNode;
    }
    if (fDomErrorHandler != null) {
        fDomErrorHandler.handleError(fDOMError);
    }
}
 
源代码15 项目: hottub   文件: DOMErrorHandlerWrapper.java
/**
 * Reports an error. Errors are non-fatal and usually signify that the
 * document is invalid with respect to its grammar(s).
 *
 * @param domain    The domain of the error. The domain can be any
 *                  string but is suggested to be a valid URI. The
 *                  domain can be used to conveniently specify a web
 *                  site location of the relevent specification or
 *                  document pertaining to this error.
 * @param key       The error key. This key can be any string and
 *                  is implementation dependent.
 * @param exception Exception.
 *
 * @throws XNIException Thrown to signal that the parser should stop
 *                      parsing the document.
 */
public void error(String domain, String key,
                  XMLParseException exception) throws XNIException {
    fDOMError.fSeverity = DOMError.SEVERITY_ERROR;
    fDOMError.fException = exception;
    // REVISIT: May need to lookup from DOMErrorTypeMap in the future.
    fDOMError.fType = key;
    fDOMError.fRelatedData = fDOMError.fMessage = exception.getMessage();
    DOMLocatorImpl locator = fDOMError.fLocator;
    if (locator != null) {
        locator.fColumnNumber = exception.getColumnNumber();
        locator.fLineNumber = exception.getLineNumber();
        locator.fUtf16Offset = exception.getCharacterOffset();
        locator.fUri = exception.getExpandedSystemId();
        locator.fRelatedNode= fCurrentNode;
    }
    if (fDomErrorHandler != null) {
        fDomErrorHandler.handleError(fDOMError);
    }
}
 
源代码16 项目: openjdk-8   文件: DOMNormalizer.java
/**
 * Reports a DOM error to the user handler.
 *
 * If the error is fatal, the processing will be always aborted.
 */
public static final void reportDOMError(DOMErrorHandler errorHandler, DOMErrorImpl error, DOMLocatorImpl locator,
                    String message, short severity, String type ) {
    if( errorHandler!=null ) {
        error.reset();
        error.fMessage = message;
        error.fSeverity = severity;
        error.fLocator = locator;
        error.fType = type;
        error.fRelatedData = locator.fRelatedNode;

        if(!errorHandler.handleError(error))
            throw abort;
    }
    if( severity==DOMError.SEVERITY_FATAL_ERROR )
        throw abort;
}
 
源代码17 项目: openjdk-8-source   文件: DOMErrorHandlerWrapper.java
/**
 * Reports an error. Errors are non-fatal and usually signify that the
 * document is invalid with respect to its grammar(s).
 *
 * @param domain    The domain of the error. The domain can be any
 *                  string but is suggested to be a valid URI. The
 *                  domain can be used to conveniently specify a web
 *                  site location of the relevent specification or
 *                  document pertaining to this error.
 * @param key       The error key. This key can be any string and
 *                  is implementation dependent.
 * @param exception Exception.
 *
 * @throws XNIException Thrown to signal that the parser should stop
 *                      parsing the document.
 */
public void error(String domain, String key,
                  XMLParseException exception) throws XNIException {
    fDOMError.fSeverity = DOMError.SEVERITY_ERROR;
    fDOMError.fException = exception;
    // REVISIT: May need to lookup from DOMErrorTypeMap in the future.
    fDOMError.fType = key;
    fDOMError.fRelatedData = fDOMError.fMessage = exception.getMessage();
    DOMLocatorImpl locator = fDOMError.fLocator;
    if (locator != null) {
        locator.fColumnNumber = exception.getColumnNumber();
        locator.fLineNumber = exception.getLineNumber();
        locator.fUtf16Offset = exception.getCharacterOffset();
        locator.fUri = exception.getExpandedSystemId();
        locator.fRelatedNode= fCurrentNode;
    }
    if (fDomErrorHandler != null) {
        fDomErrorHandler.handleError(fDOMError);
    }
}
 
/**
 * Reports an error. Errors are non-fatal and usually signify that the
 * document is invalid with respect to its grammar(s).
 *
 * @param domain    The domain of the error. The domain can be any
 *                  string but is suggested to be a valid URI. The
 *                  domain can be used to conveniently specify a web
 *                  site location of the relevent specification or
 *                  document pertaining to this error.
 * @param key       The error key. This key can be any string and
 *                  is implementation dependent.
 * @param exception Exception.
 *
 * @throws XNIException Thrown to signal that the parser should stop
 *                      parsing the document.
 */
public void error(String domain, String key,
                  XMLParseException exception) throws XNIException {
    fDOMError.fSeverity = DOMError.SEVERITY_ERROR;
    fDOMError.fException = exception;
    // REVISIT: May need to lookup from DOMErrorTypeMap in the future.
    fDOMError.fType = key;
    fDOMError.fRelatedData = fDOMError.fMessage = exception.getMessage();
    DOMLocatorImpl locator = fDOMError.fLocator;
    if (locator != null) {
        locator.fColumnNumber = exception.getColumnNumber();
        locator.fLineNumber = exception.getLineNumber();
        locator.fUtf16Offset = exception.getCharacterOffset();
        locator.fUri = exception.getExpandedSystemId();
        locator.fRelatedNode= fCurrentNode;
    }
    if (fDomErrorHandler != null) {
        fDomErrorHandler.handleError(fDOMError);
    }
}
 
源代码19 项目: jdk1.8-source-analysis   文件: XMLSchemaLoader.java
void reportDOMFatalError(Exception e) {
    if (fErrorHandler != null) {
        DOMErrorImpl error = new DOMErrorImpl();
        error.fException = e;
        error.fMessage = e.getMessage();
        error.fSeverity = DOMError.SEVERITY_FATAL_ERROR;
        fErrorHandler.getErrorHandler().handleError(error);
    }
}
 
/**
 * The method modifies global DOM error object
 *
 * @param message
 * @param severity
 * @param type
 * @return a DOMError
 */
protected DOMError modifyDOMError(String message, short severity, String type, Node node){
        fDOMError.reset();
        fDOMError.fMessage = message;
        fDOMError.fType = type;
        fDOMError.fSeverity = severity;
        fDOMError.fLocator = new DOMLocatorImpl(-1, -1, -1, node, null);
        return fDOMError;

}
 
源代码21 项目: Bytecoder   文件: XMLSchemaLoader.java
void reportDOMFatalError(Exception e) {
    if (fErrorHandler != null) {
        DOMErrorImpl error = new DOMErrorImpl();
        error.fException = e;
        error.fMessage = e.getMessage();
        error.fSeverity = DOMError.SEVERITY_FATAL_ERROR;
        fErrorHandler.getErrorHandler().handleError(error);
    }
}
 
源代码22 项目: openjdk-jdk9   文件: MyDOMErrorHandler.java
/**
 * Set errorOcurred to true when an error occurs.
 * @param error The error object that describes the error. This object
 * may be reused by the DOM implementation across multiple calls to
 * the handleError method.
 * @return true that processing may continue depending on.
 */
@Override
public boolean handleError (DOMError error) {
    System.err.println( "ERROR" + error.getMessage());
    System.err.println( "ERROR" + error.getRelatedData());
    errorOccured = true;
    return true;
}
 
源代码23 项目: TencentKona-8   文件: BaseMarkupSerializer.java
protected void fatalError(String message) throws IOException{
    if (fDOMErrorHandler != null) {
        modifyDOMError(message, DOMError.SEVERITY_FATAL_ERROR, null, fCurrentNode);
        fDOMErrorHandler.handleError(fDOMError);
    }
    else {
        throw new IOException(message);
    }
}
 
源代码24 项目: cxf   文件: ReflectionServiceFactoryBean.java
private void validateSchemas(SchemaCollection xmlSchemaCollection) {
    final StringBuilder errorBuilder = new StringBuilder();
    XercesXsdValidationImpl v = new XercesXsdValidationImpl();
    v.validateSchemas(xmlSchemaCollection.getXmlSchemaCollection(), new DOMErrorHandler() {
        public boolean handleError(DOMError error) {
            errorBuilder.append(error.getMessage());
            LOG.warning(error.getMessage());
            return true;
        }
    });
    if (errorBuilder.length() > 0) {
        throw new ServiceConstructionException(new Message("XSD_VALIDATION_ERROR", LOG,
                                                           errorBuilder.toString()));
    }
}
 
源代码25 项目: jdk8u60   文件: XMLSchemaLoader.java
void reportDOMFatalError(Exception e) {
    if (fErrorHandler != null) {
        DOMErrorImpl error = new DOMErrorImpl();
        error.fException = e;
        error.fMessage = e.getMessage();
        error.fSeverity = DOMError.SEVERITY_FATAL_ERROR;
        fErrorHandler.getErrorHandler().handleError(error);
    }
}
 
源代码26 项目: jdk8u60   文件: BaseMarkupSerializer.java
/**
 * The method modifies global DOM error object
 *
 * @param message
 * @param severity
 * @param type
 * @return a DOMError
 */
protected DOMError modifyDOMError(String message, short severity, String type, Node node){
        fDOMError.reset();
        fDOMError.fMessage = message;
        fDOMError.fType = type;
        fDOMError.fSeverity = severity;
        fDOMError.fLocator = new DOMLocatorImpl(-1, -1, -1, node, null);
        return fDOMError;

}
 
源代码27 项目: Bytecoder   文件: BaseMarkupSerializer.java
/**
 * The method modifies global DOM error object
 *
 * @param message
 * @param severity
 * @param type
 * @return a DOMError
 */
protected DOMError modifyDOMError(String message, short severity, String type, Node node){
        fDOMError.reset();
        fDOMError.fMessage = message;
        fDOMError.fType = type;
        fDOMError.fSeverity = severity;
        fDOMError.fLocator = new DOMLocatorImpl(-1, -1, -1, node, null);
        return fDOMError;

}
 
源代码28 项目: openjdk-jdk9   文件: XMLSchemaLoader.java
void reportDOMFatalError(Exception e) {
    if (fErrorHandler != null) {
        DOMErrorImpl error = new DOMErrorImpl();
        error.fException = e;
        error.fMessage = e.getMessage();
        error.fSeverity = DOMError.SEVERITY_FATAL_ERROR;
        fErrorHandler.getErrorHandler().handleError(error);
    }
}
 
源代码29 项目: JDKSourceCode1.8   文件: XMLSchemaLoader.java
void reportDOMFatalError(Exception e) {
    if (fErrorHandler != null) {
        DOMErrorImpl error = new DOMErrorImpl();
        error.fException = e;
        error.fMessage = e.getMessage();
        error.fSeverity = DOMError.SEVERITY_FATAL_ERROR;
        fErrorHandler.getErrorHandler().handleError(error);
    }
}
 
源代码30 项目: JDKSourceCode1.8   文件: BaseMarkupSerializer.java
/**
 * The method modifies global DOM error object
 *
 * @param message
 * @param severity
 * @param type
 * @return a DOMError
 */
protected DOMError modifyDOMError(String message, short severity, String type, Node node){
        fDOMError.reset();
        fDOMError.fMessage = message;
        fDOMError.fType = type;
        fDOMError.fSeverity = severity;
        fDOMError.fLocator = new DOMLocatorImpl(-1, -1, -1, node, null);
        return fDOMError;

}
 
 类所在包
 同包方法