Example usage for org.w3c.dom DOMError SEVERITY_FATAL_ERROR

List of usage examples for org.w3c.dom DOMError SEVERITY_FATAL_ERROR

Introduction

In this page you can find the example usage for org.w3c.dom DOMError SEVERITY_FATAL_ERROR.

Prototype

short SEVERITY_FATAL_ERROR

To view the source code for org.w3c.dom DOMError SEVERITY_FATAL_ERROR.

Click Source Link

Document

The severity of the error described by the DOMError is fatal error.

Usage

From source file:org.apache.cocoon.components.validation.jaxp.JaxpResolver.java

/**
 * <p>Resolve a resource into a {@link LSInput} from the provided location
 * information.</p>/* www . j  ava2 s.c  om*/
 * 
 * <p>This method will obtain a {@link InputSource} instance invoking the
 * {@link ValidationResolver#resolveEntity(String, String, String)} method
 * return it wrapped in a {@link JaxpInput} instance.</p>
 *
 * @param type the type of the resource being resolved.
 * @param namespace the namespace of the resource being resolved.
 * @param systemId the system identifier of the resource being resolved.
 * @param publicId the public identifier of the resource being resolved.
 * @param base the base uri against wich relative resolution should happen. 
 * @return a <b>non null</b> {@link LSInput} instance.
 * @throws LSException wrapping another {@link Exception}.
 */
public LSInput resolveResource(String type, String namespace, String systemId, String publicId, String base)
        throws LSException {
    try {
        final InputSource source = this.resolveEntity(base, publicId, systemId);
        return new JaxpInput(source);
    } catch (Exception exception) {
        String message = "Exception resolving resource " + systemId;
        Throwable err = new LSException(DOMError.SEVERITY_FATAL_ERROR, message);
        throw new NestableRuntimeException(message, err);
    }
}